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

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

Issue 11363191: Cache more GL state both service and client side. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 1 month 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_implementation_impl_autogen.h
diff --git a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
index 2ffd65ccc144313c87c3494151c79dacd0fc62c5..a2b92278dcecdd76f60472ec36c1be7d4f98c7bf 100644
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -24,8 +24,9 @@ void GLES2Implementation::BindBuffer(GLenum target, GLuint buffer) {
SetGLError(GL_INVALID_OPERATION, "BindBuffer", "buffer reserved id");
return;
}
- BindBufferHelper(target, buffer);
- helper_->BindBuffer(target, buffer);
+ if (BindBufferHelper(target, buffer)) {
+ helper_->BindBuffer(target, buffer);
+ }
}
void GLES2Implementation::BindFramebuffer(GLenum target, GLuint framebuffer) {
@@ -36,8 +37,9 @@ void GLES2Implementation::BindFramebuffer(GLenum target, GLuint framebuffer) {
GL_INVALID_OPERATION, "BindFramebuffer", "framebuffer reserved id");
return;
}
- BindFramebufferHelper(target, framebuffer);
- helper_->BindFramebuffer(target, framebuffer);
+ if (BindFramebufferHelper(target, framebuffer)) {
+ helper_->BindFramebuffer(target, framebuffer);
+ }
}
void GLES2Implementation::BindRenderbuffer(
@@ -49,8 +51,9 @@ void GLES2Implementation::BindRenderbuffer(
GL_INVALID_OPERATION, "BindRenderbuffer", "renderbuffer reserved id");
return;
}
- BindRenderbufferHelper(target, renderbuffer);
- helper_->BindRenderbuffer(target, renderbuffer);
+ if (BindRenderbufferHelper(target, renderbuffer)) {
+ helper_->BindRenderbuffer(target, renderbuffer);
+ }
}
void GLES2Implementation::BindTexture(GLenum target, GLuint texture) {
@@ -60,8 +63,9 @@ void GLES2Implementation::BindTexture(GLenum target, GLuint texture) {
SetGLError(GL_INVALID_OPERATION, "BindTexture", "texture reserved id");
return;
}
- BindTextureHelper(target, texture);
- helper_->BindTexture(target, texture);
+ if (BindTextureHelper(target, texture)) {
+ helper_->BindTexture(target, texture);
+ }
}
void GLES2Implementation::BlendColor(
@@ -1192,12 +1196,6 @@ void GLES2Implementation::UniformMatrix4fv(
helper_->UniformMatrix4fvImmediate(location, count, transpose, value);
}
-void GLES2Implementation::UseProgram(GLuint program) {
- GPU_CLIENT_SINGLE_THREAD_CHECK();
- GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glUseProgram(" << program << ")");
- helper_->UseProgram(program);
-}
-
void GLES2Implementation::ValidateProgram(GLuint program) {
GPU_CLIENT_SINGLE_THREAD_CHECK();
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glValidateProgram(" << program << ")"); // NOLINT
@@ -1426,8 +1424,9 @@ void GLES2Implementation::BindVertexArrayOES(GLuint array) {
GL_INVALID_OPERATION, "BindVertexArrayOES", "array reserved id");
return;
}
- BindVertexArrayHelper(array);
- helper_->BindVertexArrayOES(array);
+ if (BindVertexArrayHelper(array)) {
+ helper_->BindVertexArrayOES(array);
+ }
}
void GLES2Implementation::GetTranslatedShaderSourceANGLE(
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/client/gles2_implementation_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698