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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder.cc

Issue 2257533007: Autogenerate CreateAndConsumeTextureCHROMIUM handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder.cc b/gpu/command_buffer/service/gles2_cmd_decoder.cc
index dc3adeb86b6ef4e48b0218760cd6e5d509d0f89a..fe989b84063e61c99f06e0d44e9079a89a4d3450 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder.cc
@@ -1063,8 +1063,9 @@ class GLES2DecoderImpl : public GLES2Decoder, public ErrorStateClient {
void EnsureTextureForClientId(GLenum target, GLuint client_id);
void DoConsumeTextureCHROMIUM(GLenum target, const GLbyte* key);
- void DoCreateAndConsumeTextureCHROMIUM(GLenum target, const GLbyte* key,
- GLuint client_id);
+ void DoCreateAndConsumeTextureINTERNAL(GLenum target,
+ GLuint client_id,
+ const GLbyte* key);
void DoApplyScreenSpaceAntialiasingCHROMIUM();
void DoBindTexImage2DCHROMIUM(
@@ -15904,42 +15905,10 @@ void GLES2DecoderImpl::EnsureTextureForClientId(
}
}
-// If CreateAndConsumeTexture fails we still need to ensure that the client_id
-// provided is associated with a service_id/TextureRef for consistency, even if
-// the resulting texture is incomplete.
-error::Error GLES2DecoderImpl::HandleCreateAndConsumeTextureCHROMIUMImmediate(
- uint32_t immediate_data_size,
- const void* cmd_data) {
- const gles2::cmds::CreateAndConsumeTextureCHROMIUMImmediate& c =
- *static_cast<
- const gles2::cmds::CreateAndConsumeTextureCHROMIUMImmediate*>(
- cmd_data);
- GLenum target = static_cast<GLenum>(c.target);
- uint32_t data_size;
- if (!GLES2Util::ComputeDataSize(1, sizeof(GLbyte), 64, &data_size)) {
- return error::kOutOfBounds;
- }
- if (data_size > immediate_data_size) {
- return error::kOutOfBounds;
- }
- const GLbyte* mailbox =
- GetImmediateDataAs<const GLbyte*>(c, data_size, immediate_data_size);
- if (!validators_->texture_bind_target.IsValid(target)) {
- LOCAL_SET_GL_ERROR_INVALID_ENUM(
- "glCreateAndConsumeTextureCHROMIUM", target, "target");
- return error::kNoError;
- }
- if (mailbox == NULL) {
- return error::kOutOfBounds;
- }
- uint32_t client_id = c.client_id;
- DoCreateAndConsumeTextureCHROMIUM(target, mailbox, client_id);
- return error::kNoError;
-}
-
-void GLES2DecoderImpl::DoCreateAndConsumeTextureCHROMIUM(GLenum target,
- const GLbyte* data, GLuint client_id) {
- TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoCreateAndConsumeTextureCHROMIUM",
+void GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL(GLenum target,
+ GLuint client_id,
+ const GLbyte* data) {
+ TRACE_EVENT2("gpu", "GLES2DecoderImpl::DoCreateAndConsumeTextureINTERNAL",
"context", logger_.GetLogPrefix(),
"mailbox[0]", static_cast<unsigned char>(data[0]));
const Mailbox& mailbox = *reinterpret_cast<const Mailbox*>(data);
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_ids_autogen.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698