summaryrefslogtreecommitdiffstats
path: root/ui/gl/gl_surface_cgl.cc
diff options
context:
space:
mode:
authorzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-01 23:06:04 +0000
committerzmo@google.com <zmo@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-01 23:06:04 +0000
commit48fe7e4cbaf045f280a90c6e5f93867d49082ce6 (patch)
tree33c1511de1ee714d1eff15f18f9726ca939fcd45 /ui/gl/gl_surface_cgl.cc
parent19be7a6da266c546a7a52a7170df789f1ab8b710 (diff)
downloadchromium_src-48fe7e4cbaf045f280a90c6e5f93867d49082ce6.zip
chromium_src-48fe7e4cbaf045f280a90c6e5f93867d49082ce6.tar.gz
chromium_src-48fe7e4cbaf045f280a90c6e5f93867d49082ce6.tar.bz2
Move force_discrete GPU on older MacBookPro models to GpuBlacklist
Before we hardwired the forcing. Also, we refactor the SupportsDualGpus() code so it's only checked on browser process, mainly the part we check the availability of online/offline renderers. We suspect calling the renderer detection code at the same time in browser/gpu processes might cause GPU driver crashes on certain Mac systems (mostly 10.8 from crash reports). This refactoring hopefully will fix the issue. BUG=151741,131276 TEST=tree, manual on dual GPU systems (10.7 and 10.8) Review URL: https://codereview.chromium.org/10995002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@159579 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/gl/gl_surface_cgl.cc')
-rw-r--r--ui/gl/gl_surface_cgl.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/gl/gl_surface_cgl.cc b/ui/gl/gl_surface_cgl.cc
index 4f2fba2..6415d23 100644
--- a/ui/gl/gl_surface_cgl.cc
+++ b/ui/gl/gl_surface_cgl.cc
@@ -12,6 +12,7 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_context.h"
#include "ui/gl/gl_implementation.h"
+#include "ui/gl/gpu_switching_manager.h"
namespace gfx {
@@ -30,7 +31,7 @@ bool GLSurfaceCGL::InitializeOneOff() {
// GPU-related stuff is very slow without this, probably because
// the sandbox prevents loading graphics drivers or some such.
std::vector<CGLPixelFormatAttribute> attribs;
- if (GLContext::SupportsDualGpus()) {
+ if (gfx::GpuSwitchingManager::GetInstance()->SupportsDualGpus()) {
// Avoid switching to the discrete GPU just for this pixel
// format selection.
attribs.push_back(kCGLPFAAllowOfflineRenderers);