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

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

Issue 2379203002: implement getBufferSubDataAsync prototype (Closed)
Patch Set: small clarification Created 4 years, 2 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/common/gles2_cmd_format_autogen.h
diff --git a/gpu/command_buffer/common/gles2_cmd_format_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
index 70b45bad40b068fd363cfeb543df5aa4f962b0bc..d36c079d0d3bdf30e40f881718bf3e3cf0b6ad7c 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -15189,6 +15189,67 @@ static_assert(offsetof(ProgramPathFragmentInputGenCHROMIUM,
"offset of ProgramPathFragmentInputGenCHROMIUM coeffs_shm_offset "
"should be 24");
+struct GetBufferSubDataAsyncCHROMIUM {
+ typedef GetBufferSubDataAsyncCHROMIUM ValueType;
+ static const CommandId kCmdId = kGetBufferSubDataAsyncCHROMIUM;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(1);
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLenum _target,
+ GLintptr _offset,
+ GLsizeiptr _size,
+ uint32_t _data_shm_id,
+ uint32_t _data_shm_offset) {
+ SetHeader();
+ target = _target;
+ offset = _offset;
+ size = _size;
+ data_shm_id = _data_shm_id;
+ data_shm_offset = _data_shm_offset;
+ }
+
+ void* Set(void* cmd,
+ GLenum _target,
+ GLintptr _offset,
+ GLsizeiptr _size,
+ uint32_t _data_shm_id,
+ uint32_t _data_shm_offset) {
+ static_cast<ValueType*>(cmd)->Init(_target, _offset, _size, _data_shm_id,
+ _data_shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t target;
+ int32_t offset;
+ int32_t size;
+ uint32_t data_shm_id;
+ uint32_t data_shm_offset;
+};
+
+static_assert(sizeof(GetBufferSubDataAsyncCHROMIUM) == 24,
+ "size of GetBufferSubDataAsyncCHROMIUM should be 24");
+static_assert(offsetof(GetBufferSubDataAsyncCHROMIUM, header) == 0,
+ "offset of GetBufferSubDataAsyncCHROMIUM header should be 0");
+static_assert(offsetof(GetBufferSubDataAsyncCHROMIUM, target) == 4,
+ "offset of GetBufferSubDataAsyncCHROMIUM target should be 4");
+static_assert(offsetof(GetBufferSubDataAsyncCHROMIUM, offset) == 8,
+ "offset of GetBufferSubDataAsyncCHROMIUM offset should be 8");
+static_assert(offsetof(GetBufferSubDataAsyncCHROMIUM, size) == 12,
+ "offset of GetBufferSubDataAsyncCHROMIUM size should be 12");
+static_assert(
+ offsetof(GetBufferSubDataAsyncCHROMIUM, data_shm_id) == 16,
+ "offset of GetBufferSubDataAsyncCHROMIUM data_shm_id should be 16");
+static_assert(
+ offsetof(GetBufferSubDataAsyncCHROMIUM, data_shm_offset) == 20,
+ "offset of GetBufferSubDataAsyncCHROMIUM data_shm_offset should be 20");
+
struct CoverageModulationCHROMIUM {
typedef CoverageModulationCHROMIUM ValueType;
static const CommandId kCmdId = kCoverageModulationCHROMIUM;
« no previous file with comments | « gpu/command_buffer/cmd_buffer_functions.txt ('k') | gpu/command_buffer/common/gles2_cmd_format_test_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698