| 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
|
|
|