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

Unified Diff: gpu/pgl/pgl.cc

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 | « gpu/pgl/pgl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/pgl/pgl.cc
===================================================================
--- gpu/pgl/pgl.cc (revision 36538)
+++ gpu/pgl/pgl.cc (working copy)
@@ -8,12 +8,6 @@
#include "gpu/pgl/command_buffer_pepper.h"
#include "gpu/pgl/pgl.h"
-#if defined(_MSC_VER)
-#define THREAD_LOCAL __declspec(thread)
-#else
-#define THREAD_LOCAL __thread
-#endif
-
namespace {
const int32 kTransferBufferSize = 512 * 1024;
@@ -111,9 +105,9 @@
bool PGLContextImpl::MakeCurrent(PGLContextImpl* pgl_context) {
g_current_pgl_context = pgl_context;
if (pgl_context)
- gles2::g_gl_impl = pgl_context->gles2_implementation_;
+ gles2::SetGLContext(pgl_context->gles2_implementation_);
else
- gles2::g_gl_impl = NULL;
+ gles2::SetGLContext(NULL);
return true;
}
@@ -143,7 +137,11 @@
return PGLContextImpl::MakeCurrent(static_cast<PGLContextImpl*>(pgl_context));
}
-PGLBoolean pglSwapBuffers() {
+PGLContext pglGetCurrentContext(void) {
+ return g_current_pgl_context;
+}
+
+PGLBoolean pglSwapBuffers(void) {
if (!g_current_pgl_context)
return false;
« no previous file with comments | « gpu/pgl/pgl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698