Index: mojo/gles2/control_thunks_impl.cc |
diff --git a/mojo/gles2/control_thunks_impl.cc b/mojo/gles2/control_thunks_impl.cc |
index 81cad387fbf4f51cd64553fea3d6262de09e9de0..6a1d14dfb5bc3d0013ee2986a417972ecae25ac5 100644 |
--- a/mojo/gles2/control_thunks_impl.cc |
+++ b/mojo/gles2/control_thunks_impl.cc |
@@ -7,6 +7,15 @@ |
#include "mojo/gles2/gles2_context.h" |
#include "mojo/public/cpp/system/message_pipe.h" |
+extern "C" { |
+ |
+#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ |
+ ReturnType MojoGLES2gl##Function PARAMETERS; |
+#include "mojo/public/platform/native/gles2/call_visitor.h" |
+#undef VISIT_GL_CALL |
+ |
+} |
+ |
namespace gles2 { |
// static |
@@ -52,6 +61,15 @@ void ControlThunksImpl::SwapBuffers() { |
current_context_tls_.Get()->interface()->SwapBuffers(); |
} |
+void* ControlThunksImpl::GetProcAddress(const char* name) { |
+#define VISIT_GL_CALL(Function, ReturnType, PARAMETERS, ARGUMENTS) \ |
+ if (!strcmp(name, "gl##Function")) \ |
+ return reinterpret_cast<void*>(MojoGLES2gl##Function); |
+#include "mojo/public/platform/native/gles2/call_visitor.h" |
+#undef VISIT_GL_CALL |
+ return nullptr; |
+} |
+ |
void* ControlThunksImpl::GetGLES2Interface(MGLContext context) { |
GLES2Context* client = reinterpret_cast<GLES2Context*>(context); |
DCHECK(client); |