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

Unified Diff: ui/gl/gl_context_cgl.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
« no previous file with comments | « no previous file | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | ui/gl/gl_context_egl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698