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

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

Issue 2814583002: Service/ClientDiscardableManager (Closed)
Patch Set: rebase Created 3 years, 7 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 678498d6ea9270623c3cd726af0d836f9985b752..1407ca840dcdfc62b715e2debd02209b4a84a0c7 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -15944,4 +15944,120 @@ static_assert(offsetof(SetEnableDCLayersCHROMIUM, header) == 0,
static_assert(offsetof(SetEnableDCLayersCHROMIUM, enabled) == 4,
"offset of SetEnableDCLayersCHROMIUM enabled should be 4");
+struct InitializeDiscardableTextureCHROMIUM {
+ typedef InitializeDiscardableTextureCHROMIUM ValueType;
+ static const CommandId kCmdId = kInitializeDiscardableTextureCHROMIUM;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLuint _texture_id, uint32_t _shm_id, uint32_t _shm_offset) {
+ SetHeader();
+ texture_id = _texture_id;
+ shm_id = _shm_id;
+ shm_offset = _shm_offset;
+ }
+
+ void* Set(void* cmd,
+ GLuint _texture_id,
+ uint32_t _shm_id,
+ uint32_t _shm_offset) {
+ static_cast<ValueType*>(cmd)->Init(_texture_id, _shm_id, _shm_offset);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t texture_id;
+ uint32_t shm_id;
+ uint32_t shm_offset;
+};
+
+static_assert(sizeof(InitializeDiscardableTextureCHROMIUM) == 16,
+ "size of InitializeDiscardableTextureCHROMIUM should be 16");
+static_assert(
+ offsetof(InitializeDiscardableTextureCHROMIUM, header) == 0,
+ "offset of InitializeDiscardableTextureCHROMIUM header should be 0");
+static_assert(
+ offsetof(InitializeDiscardableTextureCHROMIUM, texture_id) == 4,
+ "offset of InitializeDiscardableTextureCHROMIUM texture_id should be 4");
+static_assert(
+ offsetof(InitializeDiscardableTextureCHROMIUM, shm_id) == 8,
+ "offset of InitializeDiscardableTextureCHROMIUM shm_id should be 8");
+static_assert(
+ offsetof(InitializeDiscardableTextureCHROMIUM, shm_offset) == 12,
+ "offset of InitializeDiscardableTextureCHROMIUM shm_offset should be 12");
+
+struct UnlockDiscardableTextureCHROMIUM {
+ typedef UnlockDiscardableTextureCHROMIUM ValueType;
+ static const CommandId kCmdId = kUnlockDiscardableTextureCHROMIUM;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLuint _texture_id) {
+ SetHeader();
+ texture_id = _texture_id;
+ }
+
+ void* Set(void* cmd, GLuint _texture_id) {
+ static_cast<ValueType*>(cmd)->Init(_texture_id);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t texture_id;
+};
+
+static_assert(sizeof(UnlockDiscardableTextureCHROMIUM) == 8,
+ "size of UnlockDiscardableTextureCHROMIUM should be 8");
+static_assert(offsetof(UnlockDiscardableTextureCHROMIUM, header) == 0,
+ "offset of UnlockDiscardableTextureCHROMIUM header should be 0");
+static_assert(
+ offsetof(UnlockDiscardableTextureCHROMIUM, texture_id) == 4,
+ "offset of UnlockDiscardableTextureCHROMIUM texture_id should be 4");
+
+struct LockDiscardableTextureCHROMIUM {
+ typedef LockDiscardableTextureCHROMIUM ValueType;
+ static const CommandId kCmdId = kLockDiscardableTextureCHROMIUM;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType)); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmd<ValueType>(); }
+
+ void Init(GLuint _texture_id) {
+ SetHeader();
+ texture_id = _texture_id;
+ }
+
+ void* Set(void* cmd, GLuint _texture_id) {
+ static_cast<ValueType*>(cmd)->Init(_texture_id);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t texture_id;
+};
+
+static_assert(sizeof(LockDiscardableTextureCHROMIUM) == 8,
+ "size of LockDiscardableTextureCHROMIUM should be 8");
+static_assert(offsetof(LockDiscardableTextureCHROMIUM, header) == 0,
+ "offset of LockDiscardableTextureCHROMIUM header should be 0");
+static_assert(
+ offsetof(LockDiscardableTextureCHROMIUM, texture_id) == 4,
+ "offset of LockDiscardableTextureCHROMIUM texture_id should be 4");
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
« no previous file with comments | « gpu/command_buffer/common/discardable_handle.cc ('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