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 d67e7edf0059f85c44d8fea7d026fe6585ae0cca..d7a45ce1d95cc0b9dc4d7f0bb493361af2966aa8 100644 |
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h |
@@ -30,9 +30,7 @@ void GLES2Implementation::BindBuffer(GLenum target, GLuint buffer) { |
SetGLError(GL_INVALID_OPERATION, "BindBuffer", "buffer reserved id"); |
return; |
} |
- if (BindBufferHelper(target, buffer)) { |
- helper_->BindBuffer(target, buffer); |
- } |
+ BindBufferHelper(target, buffer); |
CheckGLError(); |
} |
@@ -46,9 +44,7 @@ void GLES2Implementation::BindFramebuffer(GLenum target, GLuint framebuffer) { |
"framebuffer reserved id"); |
return; |
} |
- if (BindFramebufferHelper(target, framebuffer)) { |
- helper_->BindFramebuffer(target, framebuffer); |
- } |
+ BindFramebufferHelper(target, framebuffer); |
CheckGLError(); |
} |
@@ -62,9 +58,7 @@ void GLES2Implementation::BindRenderbuffer(GLenum target, GLuint renderbuffer) { |
"renderbuffer reserved id"); |
return; |
} |
- if (BindRenderbufferHelper(target, renderbuffer)) { |
- helper_->BindRenderbuffer(target, renderbuffer); |
- } |
+ BindRenderbufferHelper(target, renderbuffer); |
CheckGLError(); |
} |
@@ -77,9 +71,7 @@ void GLES2Implementation::BindTexture(GLenum target, GLuint texture) { |
SetGLError(GL_INVALID_OPERATION, "BindTexture", "texture reserved id"); |
return; |
} |
- if (BindTextureHelper(target, texture)) { |
- helper_->BindTexture(target, texture); |
- } |
+ BindTextureHelper(target, texture); |
CheckGLError(); |
} |
@@ -1032,6 +1024,62 @@ void GLES2Implementation::Hint(GLenum target, GLenum mode) { |
CheckGLError(); |
} |
+void GLES2Implementation::InvalidateFramebuffer(GLenum target, |
+ GLsizei count, |
+ const GLenum* attachments) { |
+ GPU_CLIENT_SINGLE_THREAD_CHECK(); |
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInvalidateFramebuffer(" |
+ << GLES2Util::GetStringFrameBufferTarget(target) << ", " |
+ << count << ", " << static_cast<const void*>(attachments) |
+ << ")"); |
+ GPU_CLIENT_LOG_CODE_BLOCK({ |
+ for (GLsizei i = 0; i < count; ++i) { |
+ GPU_CLIENT_LOG(" " << i << ": " << attachments[0 + i * 1]); |
+ } |
+ }); |
+ if (count < 0) { |
+ SetGLError(GL_INVALID_VALUE, "glInvalidateFramebuffer", "count < 0"); |
+ return; |
+ } |
+ helper_->InvalidateFramebufferImmediate(target, count, attachments); |
+ CheckGLError(); |
+} |
+ |
+void GLES2Implementation::InvalidateSubFramebuffer(GLenum target, |
+ GLsizei count, |
+ const GLenum* attachments, |
+ GLint x, |
+ GLint y, |
+ GLsizei width, |
+ GLsizei height) { |
+ GPU_CLIENT_SINGLE_THREAD_CHECK(); |
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glInvalidateSubFramebuffer(" |
+ << GLES2Util::GetStringFrameBufferTarget(target) << ", " |
+ << count << ", " << static_cast<const void*>(attachments) |
+ << ", " << x << ", " << y << ", " << width << ", " |
+ << height << ")"); |
+ GPU_CLIENT_LOG_CODE_BLOCK({ |
+ for (GLsizei i = 0; i < count; ++i) { |
+ GPU_CLIENT_LOG(" " << i << ": " << attachments[0 + i * 1]); |
+ } |
+ }); |
+ if (count < 0) { |
+ SetGLError(GL_INVALID_VALUE, "glInvalidateSubFramebuffer", "count < 0"); |
+ return; |
+ } |
+ if (width < 0) { |
+ SetGLError(GL_INVALID_VALUE, "glInvalidateSubFramebuffer", "width < 0"); |
+ return; |
+ } |
+ if (height < 0) { |
+ SetGLError(GL_INVALID_VALUE, "glInvalidateSubFramebuffer", "height < 0"); |
+ return; |
+ } |
+ helper_->InvalidateSubFramebufferImmediate(target, count, attachments, x, y, |
+ width, height); |
+ CheckGLError(); |
+} |
+ |
GLboolean GLES2Implementation::IsBuffer(GLuint buffer) { |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
TRACE_EVENT0("gpu", "GLES2Implementation::IsBuffer"); |
@@ -1157,6 +1205,14 @@ void GLES2Implementation::PolygonOffset(GLfloat factor, GLfloat units) { |
CheckGLError(); |
} |
+void GLES2Implementation::ReadBuffer(GLenum src) { |
+ GPU_CLIENT_SINGLE_THREAD_CHECK(); |
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glReadBuffer(" |
+ << GLES2Util::GetStringEnum(src) << ")"); |
+ helper_->ReadBuffer(src); |
+ CheckGLError(); |
+} |
+ |
void GLES2Implementation::ReleaseShaderCompiler() { |
GPU_CLIENT_SINGLE_THREAD_CHECK(); |
GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glReleaseShaderCompiler(" |
@@ -1997,9 +2053,7 @@ void GLES2Implementation::UseProgram(GLuint program) { |
SetGLError(GL_INVALID_OPERATION, "UseProgram", "program reserved id"); |
return; |
} |
- if (UseProgramHelper(program)) { |
- helper_->UseProgram(program); |
- } |
+ UseProgramHelper(program); |
CheckGLError(); |
} |
@@ -2408,9 +2462,7 @@ void GLES2Implementation::BindVertexArrayOES(GLuint array) { |
SetGLError(GL_INVALID_OPERATION, "BindVertexArrayOES", "array reserved id"); |
return; |
} |
- if (BindVertexArrayOESHelper(array)) { |
- helper_->BindVertexArrayOES(array); |
- } |
+ BindVertexArrayOESHelper(array); |
CheckGLError(); |
} |
@@ -2558,9 +2610,7 @@ void GLES2Implementation::BindValuebufferCHROMIUM(GLenum target, |
"valuebuffer reserved id"); |
return; |
} |
- if (BindValuebufferCHROMIUMHelper(target, valuebuffer)) { |
- helper_->BindValuebufferCHROMIUM(target, valuebuffer); |
- } |
+ BindValuebufferCHROMIUMHelper(target, valuebuffer); |
CheckGLError(); |
} |