| Index: ui/gl/gl_context_cgl.cc
|
| diff --git a/ui/gl/gl_context_cgl.cc b/ui/gl/gl_context_cgl.cc
|
| index 151c484d550f0d7b5f8062ffade0f670307d04a2..141d9352a42c56c756a4c367c3d499b9922db4f4 100644
|
| --- a/ui/gl/gl_context_cgl.cc
|
| +++ b/ui/gl/gl_context_cgl.cc
|
| @@ -178,6 +178,7 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) {
|
| if (IsCurrent(surface))
|
| return true;
|
|
|
| + ScopedReleaseCurrent release_current;
|
| TRACE_EVENT0("gpu", "GLContextCGL::MakeCurrent");
|
|
|
| if (CGLSetCurrentContext(
|
| @@ -191,7 +192,6 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) {
|
|
|
| SetCurrent(surface);
|
| if (!InitializeDynamicBindings()) {
|
| - ReleaseCurrent(surface);
|
| return false;
|
| }
|
|
|
| @@ -200,6 +200,7 @@ bool GLContextCGL::MakeCurrent(GLSurface* surface) {
|
| return false;
|
| }
|
|
|
| + release_current.Cancel();
|
| return true;
|
| }
|
|
|
|
|