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

Unified Diff: mojo/gpu/mojo_gles2_impl_autogen.cc

Issue 1035813002: Remove all usages of MojoGLES2GetGLES2Interface(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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/command_buffer/build_gles2_cmd_buffer.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/gpu/mojo_gles2_impl_autogen.cc
diff --git a/mojo/gpu/mojo_gles2_impl_autogen.cc b/mojo/gpu/mojo_gles2_impl_autogen.cc
index efc1f01109a0c2b37608e6ad113e9b083b55ceba..513c00f96d119c3e31a570bffae03b571b0786e0 100644
--- a/mojo/gpu/mojo_gles2_impl_autogen.cc
+++ b/mojo/gpu/mojo_gles2_impl_autogen.cc
@@ -11,9 +11,12 @@
#include "mojo/gpu/mojo_gles2_impl_autogen.h"
#include "base/logging.h"
+#include "third_party/mojo/src/mojo/public/c/gles2/chromium_miscellaneous.h"
+#include "third_party/mojo/src/mojo/public/c/gles2/chromium_sub_image.h"
#include "third_party/mojo/src/mojo/public/c/gles2/chromium_sync_point.h"
#include "third_party/mojo/src/mojo/public/c/gles2/chromium_texture_mailbox.h"
#include "third_party/mojo/src/mojo/public/c/gles2/gles2.h"
+#include "third_party/mojo/src/mojo/public/c/gles2/occlusion_query_ext.h"
namespace mojo {
@@ -762,8 +765,8 @@ void MojoGLES2Impl::ShallowFinishCHROMIUM() {
NOTREACHED() << "Unimplemented ShallowFinishCHROMIUM.";
}
void MojoGLES2Impl::ShallowFlushCHROMIUM() {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))->ShallowFlushCHROMIUM();
+ MojoGLES2MakeCurrent(context_);
+ glShallowFlushCHROMIUM();
}
void MojoGLES2Impl::OrderingBarrierCHROMIUM() {
NOTREACHED() << "Unimplemented OrderingBarrierCHROMIUM.";
@@ -1194,41 +1197,40 @@ void MojoGLES2Impl::TexStorage2DEXT(GLenum target,
NOTREACHED() << "Unimplemented TexStorage2DEXT.";
}
void MojoGLES2Impl::GenQueriesEXT(GLsizei n, GLuint* queries) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))->GenQueriesEXT(n, queries);
+ MojoGLES2MakeCurrent(context_);
+ glGenQueriesEXT(n, queries);
}
void MojoGLES2Impl::DeleteQueriesEXT(GLsizei n, const GLuint* queries) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))
- ->DeleteQueriesEXT(n, queries);
+ MojoGLES2MakeCurrent(context_);
+ glDeleteQueriesEXT(n, queries);
}
GLboolean MojoGLES2Impl::IsQueryEXT(GLuint id) {
- NOTREACHED() << "Unimplemented IsQueryEXT.";
- return 0;
+ MojoGLES2MakeCurrent(context_);
+ return glIsQueryEXT(id);
}
void MojoGLES2Impl::BeginQueryEXT(GLenum target, GLuint id) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))->BeginQueryEXT(target, id);
+ MojoGLES2MakeCurrent(context_);
+ glBeginQueryEXT(target, id);
}
void MojoGLES2Impl::BeginTransformFeedback(GLenum primitivemode) {
NOTREACHED() << "Unimplemented BeginTransformFeedback.";
}
void MojoGLES2Impl::EndQueryEXT(GLenum target) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))->EndQueryEXT(target);
+ MojoGLES2MakeCurrent(context_);
+ glEndQueryEXT(target);
}
void MojoGLES2Impl::EndTransformFeedback() {
NOTREACHED() << "Unimplemented EndTransformFeedback.";
}
void MojoGLES2Impl::GetQueryivEXT(GLenum target, GLenum pname, GLint* params) {
- NOTREACHED() << "Unimplemented GetQueryivEXT.";
+ MojoGLES2MakeCurrent(context_);
+ glGetQueryivEXT(target, pname, params);
}
void MojoGLES2Impl::GetQueryObjectuivEXT(GLuint id,
GLenum pname,
GLuint* params) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))
- ->GetQueryObjectuivEXT(id, pname, params);
+ MojoGLES2MakeCurrent(context_);
+ glGetQueryObjectuivEXT(id, pname, params);
}
void MojoGLES2Impl::InsertEventMarkerEXT(GLsizei length, const GLchar* marker) {
NOTREACHED() << "Unimplemented InsertEventMarkerEXT.";
@@ -1304,15 +1306,13 @@ void* MojoGLES2Impl::MapTexSubImage2DCHROMIUM(GLenum target,
GLenum format,
GLenum type,
GLenum access) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))
- ->MapTexSubImage2DCHROMIUM(target, level, xoffset, yoffset, width, height,
- format, type, access);
+ MojoGLES2MakeCurrent(context_);
+ return glMapTexSubImage2DCHROMIUM(target, level, xoffset, yoffset, width,
+ height, format, type, access);
}
void MojoGLES2Impl::UnmapTexSubImage2DCHROMIUM(const void* mem) {
- return static_cast<gpu::gles2::GLES2Interface*>(
- MojoGLES2GetGLES2Interface(context_))
- ->UnmapTexSubImage2DCHROMIUM(mem);
+ MojoGLES2MakeCurrent(context_);
+ glUnmapTexSubImage2DCHROMIUM(mem);
}
void MojoGLES2Impl::ResizeCHROMIUM(GLuint width,
GLuint height,
« no previous file with comments | « gpu/command_buffer/build_gles2_cmd_buffer.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698