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

Unified Diff: ui/gl/gl_context_glx.cc

Issue 16838007: Ensure real GL Api is set before making GL calls. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
Index: ui/gl/gl_context_glx.cc
diff --git a/ui/gl/gl_context_glx.cc b/ui/gl/gl_context_glx.cc
index 662538beb589e070bc8eab9b9d95e037bda43deb..eb4e366ab4fae59749f656113b7be6b587c6c785 100644
--- a/ui/gl/gl_context_glx.cc
+++ b/ui/gl/gl_context_glx.cc
@@ -123,6 +123,9 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
return false;
}
+ // Set this as soon as the context is current, since we might call into GL.
+ SetRealGLApi();
+
SetCurrent(surface);
if (!InitializeExtensionBindings()) {
ReleaseCurrent(surface);
@@ -137,7 +140,6 @@ bool GLContextGLX::MakeCurrent(GLSurface* surface) {
return false;
}
- SetRealGLApi();
return true;
}

Powered by Google App Engine
This is Rietveld 408576698