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

Unified Diff: ui/gl/gl_bindings.h

Issue 16894002: Unset GL Api when releasing a context. (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.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/gl/gl_bindings.h
diff --git a/ui/gl/gl_bindings.h b/ui/gl/gl_bindings.h
index a09cd7141caf594aea35b7355f39d004ecad88a7..2405b8126192912659c90a8970f8aa055d3d1de4 100644
--- a/ui/gl/gl_bindings.h
+++ b/ui/gl/gl_bindings.h
@@ -15,7 +15,9 @@
#include <EGL/egl.h>
#include <EGL/eglext.h>
+#include "base/lazy_instance.h"
#include "base/logging.h"
+#include "base/threading/thread_local.h"
#include "build/build_config.h"
#include "ui/gl/gl_export.h"
@@ -285,7 +287,9 @@ struct GL_EXPORT DriverGLX {
};
#endif
-GL_EXPORT extern GLApi* g_current_gl_context;
+#define g_current_gl_context g_current_gl_context_tls.Pointer()->Get()
no sievers 2013/06/12 23:34:59 I did this hack for the autogenerated code.
+GL_EXPORT extern base::LazyInstance<base::ThreadLocalPointer<GLApi> >
+ g_current_gl_context_tls;
GL_EXPORT extern OSMESAApi* g_current_osmesa_context;
GL_EXPORT extern DriverGL g_driver_gl;
GL_EXPORT extern DriverOSMESA g_driver_osmesa;
« no previous file with comments | « no previous file | ui/gl/gl_context.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698