Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(390)

Unified Diff: content/browser/gpu/gpu_data_manager_impl.cc

Issue 10830203: Ensure a compositing window is created if the image transport surface isn't used. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: content/browser/gpu/gpu_data_manager_impl.cc
diff --git a/content/browser/gpu/gpu_data_manager_impl.cc b/content/browser/gpu/gpu_data_manager_impl.cc
index 72a98cca0b1631cfaf6e80165bcfb04a73494d61..a2a320cde5c4a5aaeaf16fb9060101858b03d65a 100644
--- a/content/browser/gpu/gpu_data_manager_impl.cc
+++ b/content/browser/gpu/gpu_data_manager_impl.cc
@@ -24,6 +24,10 @@
#include "ui/gl/gl_switches.h"
#include "webkit/plugins/plugin_switches.h"
+#if defined(OS_WIN)
+#include "base/win/windows_version.h"
+#endif
+
using content::BrowserThread;
using content::GpuDataManagerObserver;
using content::GpuFeatureType;
@@ -242,6 +246,24 @@ void GpuDataManagerImpl::AppendGpuCommandLine(
}
}
+#if defined(OS_WIN)
+bool GpuDataManagerImpl::IsUsingAcceleratedSurface() {
+ if (base::win::GetVersion() < base::win::VERSION_VISTA)
+ return false;
+
+ base::AutoLock auto_lock(gpu_info_lock_);
+ if (gpu_info_.amd_switchable)
+ return false;
+ if (software_rendering_)
+ return false;
+ uint32 flags = GetGpuFeatureType();
+ if (flags & content::GPU_FEATURE_TYPE_TEXTURE_SHARING)
+ return false;
+
+ return true;
+}
+#endif
+
void GpuDataManagerImpl::AppendPluginCommandLine(
CommandLine* command_line) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
« no previous file with comments | « content/browser/gpu/gpu_data_manager_impl.h ('k') | content/browser/renderer_host/render_widget_host_view_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698