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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h

Issue 1119723003: Add glCopyCompressedTextureCHROMIUM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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
Index: gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
index 62d0391c508bf3d2e7096e3d790bc60472f6208e..9accbb85950010c2e99b921640aaec435617cf90 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_autogen.h
@@ -4460,6 +4460,38 @@ error::Error GLES2DecoderImpl::HandleCopySubTextureCHROMIUM(
return error::kNoError;
}
+error::Error GLES2DecoderImpl::HandleCopyCompressedTextureCHROMIUM(
+ uint32_t immediate_data_size,
+ const void* cmd_data) {
+ const gles2::cmds::CopyCompressedTextureCHROMIUM& c =
+ *static_cast<const gles2::cmds::CopyCompressedTextureCHROMIUM*>(cmd_data);
+ (void)c;
+ GLenum target = static_cast<GLenum>(c.target);
+ GLenum source_id = static_cast<GLenum>(c.source_id);
+ GLenum dest_id = static_cast<GLenum>(c.dest_id);
+ GLenum internalformat = static_cast<GLenum>(c.internalformat);
+ GLenum dest_type = static_cast<GLenum>(c.dest_type);
+ GLsizei source_size = static_cast<GLsizei>(c.source_size);
+ if (!validators_->compressed_texture_format.IsValid(internalformat)) {
+ LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyCompressedTextureCHROMIUM",
+ internalformat, "internalformat");
+ return error::kNoError;
+ }
+ if (!validators_->pixel_type.IsValid(dest_type)) {
+ LOCAL_SET_GL_ERROR_INVALID_ENUM("glCopyCompressedTextureCHROMIUM",
+ dest_type, "dest_type");
+ return error::kNoError;
+ }
+ if (source_size < 0) {
+ LOCAL_SET_GL_ERROR(GL_INVALID_VALUE, "glCopyCompressedTextureCHROMIUM",
+ "source_size < 0");
+ return error::kNoError;
+ }
+ DoCopyCompressedTextureCHROMIUM(target, source_id, dest_id, internalformat,
+ dest_type, source_size);
+ return error::kNoError;
+}
+
error::Error GLES2DecoderImpl::HandleProduceTextureCHROMIUMImmediate(
uint32_t immediate_data_size,
const void* cmd_data) {

Powered by Google App Engine
This is Rietveld 408576698