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

Unified Diff: gpu/command_buffer/common/gles2_cmd_format.h

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
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1ac1d8967db3902a751ca3f8f0cde123f6ab2de8..709b996978877f04b986836ee5c79197d7c0aa5c 100644
--- a/gpu/command_buffer/common/gles2_cmd_format.h
+++ b/gpu/command_buffer/common/gles2_cmd_format.h
@@ -321,59 +321,6 @@ struct GenMailboxCHROMIUM {
CommandHeader header;
};
-struct CreateAndConsumeTextureCHROMIUMImmediate {
- typedef CreateAndConsumeTextureCHROMIUMImmediate ValueType;
- static const CommandId kCmdId = kCreateAndConsumeTextureCHROMIUMImmediate;
- static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
- static const uint8_t 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;
-};
-
-static_assert(sizeof(CreateAndConsumeTextureCHROMIUMImmediate) == 12,
- "size of CreateAndConsumeTextureCHROMIUMImmediate should be 12");
-static_assert(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, header) == 0,
- "offset of CreateAndConsumeTextureCHROMIUMImmediate.header "
- "should be 0");
-static_assert(offsetof(CreateAndConsumeTextureCHROMIUMImmediate, target) == 4,
- "offset of CreateAndConsumeTextureCHROMIUMImmediate.target "
- "should be 4");
-static_assert(
- offsetof(CreateAndConsumeTextureCHROMIUMImmediate, client_id) == 8,
- "offset of CreateAndConsumeTextureCHROMIUMImmediate.client_id should be 8");
-
-
#pragma pack(pop)
} // namespace cmd
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698