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: gpu/command_buffer/client/gles2_lib.h

Issue 553050: Windows now uses the TLS API instead of __declspec(thread) for client side co... (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
Index: gpu/command_buffer/client/gles2_lib.h
===================================================================
--- gpu/command_buffer/client/gles2_lib.h (revision 37133)
+++ gpu/command_buffer/client/gles2_lib.h (working copy)
@@ -9,24 +9,20 @@
#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 THREAD_LOCAL gpu::gles2::GLES2Implementation* g_gl_impl;
+// Initialize the GLES2 library.
+void Initialize();
-inline gpu::gles2::GLES2Implementation* GetGLContext() {
- return g_gl_impl;
-}
+// Terminate the GLES2 library.
+void Terminate();
-inline void SetGLContext(gpu::gles2::GLES2Implementation* impl) {
- g_gl_impl = impl;
-}
+// Get the current GL context.
+gpu::gles2::GLES2Implementation* GetGLContext();
+// Set the current GL context.
+void SetGLContext(gpu::gles2::GLES2Implementation* impl);
+
} // namespace gles2
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_LIB_H_

Powered by Google App Engine
This is Rietveld 408576698