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

Unified Diff: ui/gl/gl_context_cgl.cc

Issue 10909221: Implement blacklist's force GPU capability in dual GPU machines. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 years, 3 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: ui/gl/gl_context_cgl.cc
===================================================================
--- ui/gl/gl_context_cgl.cc (revision 156195)
+++ ui/gl/gl_context_cgl.cc (working copy)
@@ -12,6 +12,7 @@
#include "ui/gl/gl_bindings.h"
#include "ui/gl/gl_implementation.h"
#include "ui/gl/gl_surface_cgl.h"
+#include "ui/gl/gpu_switching_manager.h"
namespace gfx {
@@ -26,6 +27,9 @@
GpuPreference gpu_preference) {
DCHECK(compatible_surface);
+ gpu_preference = GpuSwitchingManager::GetInstance()->AdjustGpuPreference(
+ gpu_preference);
+
GLContextCGL* share_context = share_group() ?
static_cast<GLContextCGL*>(share_group()->GetContext()) : NULL;
@@ -162,15 +166,4 @@
return gpu_preference_;
}
-void GLContextCGL::ForceUseOfDiscreteGPU() {
- static CGLPixelFormatObj format = NULL;
- if (format)
- return;
- CGLPixelFormatAttribute attribs[1];
- attribs[0] = static_cast<CGLPixelFormatAttribute>(0);
- GLint num_pixel_formats = 0;
- CGLChoosePixelFormat(attribs, &format, &num_pixel_formats);
- // format is deliberately leaked.
-}
-
} // namespace gfx
« no previous file with comments | « ui/gl/gl_context_cgl.h ('k') | ui/gl/gl_context_mac.mm » ('j') | ui/gl/gl_switches.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698