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

Unified Diff: gpu/command_buffer/client/gles2_lib.h

Issue 549090: Added pglGetCurrentContext. Make gles2 implementation pointer global variable... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 11 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 | gpu/command_buffer/client/gles2_lib.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/client/gles2_lib.h
===================================================================
--- gpu/command_buffer/client/gles2_lib.h (revision 36538)
+++ gpu/command_buffer/client/gles2_lib.h (working copy)
@@ -9,18 +9,24 @@
#include "gpu/command_buffer/client/gles2_implementation.h"
+#if defined(_MSC_VER)
+#define THREAD_LOCAL __declspec(thread)
+#else
+#define THREAD_LOCAL __thread
+#endif
+
namespace gles2 {
-extern ::gpu::gles2::GLES2Implementation* g_gl_impl;
+extern THREAD_LOCAL gpu::gles2::GLES2Implementation* g_gl_impl;
-inline ::gpu::gles2::GLES2Implementation* GetGLContext() {
+inline gpu::gles2::GLES2Implementation* GetGLContext() {
return g_gl_impl;
}
-// Initializes the GLES2 library.
-bool InitGLES2Lib();
+inline void SetGLContext(gpu::gles2::GLES2Implementation* impl) {
+ g_gl_impl = impl;
+}
} // namespace gles2
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_
-
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_lib.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698