Chromium Code Reviews| Index: ui/gl/gl_context_cgl.cc |
| =================================================================== |
| --- ui/gl/gl_context_cgl.cc (revision 158081) |
| +++ ui/gl/gl_context_cgl.cc (working copy) |
| @@ -224,4 +224,15 @@ |
| CGLDestroyRendererInfo(x); |
| } |
| +void GLContextCGL::ForceUseOfDiscreteGPU() { |
| + static CGLPixelFormatObj format = NULL; |
| + if (format) |
|
Ken Russell (switch to Gerrit)
2012/09/21 23:00:29
Indentation is off.
Zhenyao Mo
2012/09/21 23:08:09
Done.
|
| + 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 |