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

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

Issue 754873002: Add a second unsafe ES3 API in command buffer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 a0d2b5d166f84137dbcc1d07281f908d71abfc53..e6833a319b0e629b3df49dce07bca2b51da3ce83 100644
--- a/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_impl_autogen.h
@@ -209,6 +209,34 @@ void GLES2Implementation::CompileShader(GLuint shader) {
CheckGLError();
}
+void GLES2Implementation::CopyBufferSubData(GLenum readtarget,
+ GLenum writetarget,
+ GLintptr readoffset,
+ GLintptr writeoffset,
+ GLsizeiptr size) {
+ GPU_CLIENT_SINGLE_THREAD_CHECK();
+ GPU_CLIENT_LOG("[" << GetLogPrefix() << "] glCopyBufferSubData("
+ << GLES2Util::GetStringBufferTarget(readtarget) << ", "
+ << GLES2Util::GetStringBufferTarget(writetarget) << ", "
+ << readoffset << ", " << writeoffset << ", " << size
+ << ")");
+ if (readoffset < 0) {
+ SetGLError(GL_INVALID_VALUE, "glCopyBufferSubData", "readoffset < 0");
+ return;
+ }
+ if (writeoffset < 0) {
+ SetGLError(GL_INVALID_VALUE, "glCopyBufferSubData", "writeoffset < 0");
+ return;
+ }
+ if (size < 0) {
+ SetGLError(GL_INVALID_VALUE, "glCopyBufferSubData", "size < 0");
+ return;
+ }
+ helper_->CopyBufferSubData(readtarget, writetarget, readoffset, writeoffset,
+ size);
+ CheckGLError();
+}
+
void GLES2Implementation::CopyTexImage2D(GLenum target,
GLint level,
GLenum internalformat,

Powered by Google App Engine
This is Rietveld 408576698