Chromium Code Reviews| Index: ui/gl/gl_context_cgl.cc |
| diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc |
| index d826d81dc07f0e6d3304da4f1b2a849f96b0ffa7..0b63b4b3ea8485ce521ab8ed6fc6d2af1bd1c112 100644 |
| --- a/ui/gl/gl_context_cgl.cc |
| +++ b/ui/gl/gl_context_cgl.cc |
| @@ -186,6 +186,9 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) { |
| return false; |
| } |
| + // Set this as soon as the context is current, since we might call into GL. |
| + SetRealGLApi(); |
|
greggman
2013/06/12 22:17:18
Do you want to restore it if it fails?
I know tha
|
| + |
| SetCurrent(surface); |
| if (!InitializeExtensionBindings()) { |
| ReleaseCurrent(surface); |
| @@ -197,7 +200,6 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) { |
| return false; |
| } |
| - SetRealGLApi(); |
| return true; |
| } |