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

Unified Diff: ui/gl/gl_context_osmesa.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_osmesa.cc
diff --git a/ui/gl/gl_context_osmesa.cc b/ui/gl/gl_context_osmesa.cc
index 71154eca0974a1d1ca1930cbbc1b5fce50663722..cb71aa57a7e1a059ad73ef2e27cc6cfd6ccbb12a 100644
--- a/ui/gl/gl_context_osmesa.cc
+++ b/ui/gl/gl_context_osmesa.cc
@@ -62,6 +62,9 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) {
return false;
}
+ // Set this as soon as the context is current, since we might call into GL.
+ SetRealGLApi();
+
// Row 0 is at the top.
OSMesaPixelStore(OSMESA_Y_UP, 0);
@@ -76,7 +79,6 @@ bool GLContextOSMesa::MakeCurrent(GLSurface* surface) {
return false;
}
- SetRealGLApi();
return true;
}
« ui/gl/gl_context_cgl.cc ('K') | « ui/gl/gl_context_glx.cc ('k') | ui/gl/gl_context_wgl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698