| Index: gpu/command_buffer/common/gles2_cmd_format.h
|
| diff --git a/gpu/command_buffer/common/gles2_cmd_format.h b/gpu/command_buffer/common/gles2_cmd_format.h
|
| index a541cbb09e8545d408e305792f7ab4ac4561bf65..656b4b12a9a682358d44bd2bc536db0062e7e5ec 100644
|
| --- a/gpu/command_buffer/common/gles2_cmd_format.h
|
| +++ b/gpu/command_buffer/common/gles2_cmd_format.h
|
| @@ -461,6 +461,57 @@ struct InsertSyncPointCHROMIUM {
|
| CommandHeader header;
|
| };
|
|
|
| +struct CreateAndConsumeTextureCHROMIUMImmediate {
|
| + typedef CreateAndConsumeTextureCHROMIUMImmediate ValueType;
|
| + static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUMImmediate;
|
| + static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
|
| + static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
|
| +
|
| + static uint32_t ComputeDataSize() {
|
| + return static_cast<uint32_t>(sizeof(GLbyte) * 64); // NOLINT
|
| + }
|
| +
|
| + static uint32_t ComputeSize() {
|
| + return static_cast<uint32_t>(sizeof(ValueType) +
|
| + ComputeDataSize()); // NOLINT
|
| + }
|
| +
|
| + void SetHeader(uint32_t size_in_bytes) {
|
| + header.SetCmdByTotalSize<ValueType>(size_in_bytes);
|
| + }
|
| +
|
| + void Init(GLenum _target, uint32_t _client_id, const GLbyte* _mailbox) {
|
| + SetHeader(ComputeSize());
|
| + target = _target;
|
| + client_id = _client_id;
|
| + memcpy(ImmediateDataAddress(this), _mailbox, ComputeDataSize());
|
| + }
|
| +
|
| + void* Set(void* cmd,
|
| + GLenum _target,
|
| + uint32_t _client_id,
|
| + const GLbyte* _mailbox) {
|
| + static_cast<ValueType*>(cmd)->Init(_target, _client_id, _mailbox);
|
| + const uint32_t size = ComputeSize();
|
| + return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
|
| + }
|
| +
|
| + gpu::CommandHeader header;
|
| + uint32_t target;
|
| + uint32_t client_id;
|
| +};
|
| +
|
| +COMPILE_ASSERT(sizeof(CreateAndConsumeTextureCHROMIUMImmediate) == 12,
|
| + Sizeof_CreateAndConsumeTextureCHROMIUMImmediate_is_not_12);
|
| +COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, header) == 0,
|
| + OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_header_not_0);
|
| +COMPILE_ASSERT(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, target) == 4,
|
| + OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_target_not_4);
|
| +COMPILE_ASSERT(
|
| + offsetof(CreateAndConsumeTextureCHROMIUMImmediate, client_id) == 8,
|
| + OffsetOf_CreateAndConsumeTextureCHROMIUMImmediate_client_id_not_8);
|
| +
|
| +
|
| #pragma pack(pop)
|
|
|
| } // namespace cmd
|
|
|