diff options
Diffstat (limited to 'chromium/ui/gl/gl_context_osmesa.cc')
-rw-r--r-- | chromium/ui/gl/gl_context_osmesa.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/chromium/ui/gl/gl_context_osmesa.cc b/chromium/ui/gl/gl_context_osmesa.cc index cb71aa57a7e..524fe42bb17 100644 --- a/chromium/ui/gl/gl_context_osmesa.cc +++ b/chromium/ui/gl/gl_context_osmesa.cc @@ -52,6 +52,7 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) { gfx::Size size = surface->GetSize(); + ScopedReleaseCurrent release_current; if (!OSMesaMakeCurrent(context_, surface->GetHandle(), GL_UNSIGNED_BYTE, @@ -69,8 +70,7 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) { OSMesaPixelStore(OSMESA_Y_UP, 0); SetCurrent(surface); - if (!InitializeExtensionBindings()) { - ReleaseCurrent(surface); + if (!InitializeDynamicBindings()) { return false; } @@ -79,6 +79,7 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) { return false; } + release_current.Cancel(); return true; } @@ -87,6 +88,7 @@ void GLContextOSMesa::ReleaseCurrent(GLSurface* surface) { return; SetCurrent(NULL); + // TODO: Calling with NULL here does not work to release the context. OSMesaMakeCurrent(NULL, NULL, GL_UNSIGNED_BYTE, 0, 0); } |