Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1587)

Unified Diff: ui/gl/gl_context_glx.cc

Issue 221433004: gpu: Bind dummy GL API when no context is current (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix two gpu unittests Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ui/gl/gl_context_egl.cc ('k') | ui/gl/gl_context_nsview.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_context_glx.cc
diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
index 30b07c7ca7d78bf00b9a78acc72801a621b70edb..d5ab073e40daf4c48411c10556e030fb469d2361 100644
--- a/ui/gl/gl_context_glx.cc
+++ b/ui/gl/gl_context_glx.cc
@@ -98,6 +98,7 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
if (IsCurrent(surface))
return true;
+ ScopedReleaseCurrent release_current;
TRACE_EVENT0("gpu", "GLContextGLX::MakeCurrent");
if (!glXMakeContextCurrent(
display_,
@@ -114,18 +115,17 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
SetCurrent(surface);
if (!InitializeDynamicBindings()) {
- ReleaseCurrent(surface);
Destroy();
return false;
}
if (!surface->OnMakeCurrent(this)) {
LOG(ERROR) << "Could not make current.";
- ReleaseCurrent(surface);
Destroy();
return false;
}
+ release_current.Cancel();
return true;
}
« no previous file with comments | « ui/gl/gl_context_egl.cc ('k') | ui/gl/gl_context_nsview.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698