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

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

Issue 2456213002: WebVR: implement SetSurfaceHandleCHROMIUM extension for gvr_device.
Patch Set: Rebase, set dependency. Created 3 years, 11 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 8383d51a58893129f481679be655324a3022ca6a..5b7b7e20e6ef602a9749f31064a7310127d98e33 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -15652,4 +15652,37 @@ static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12,
static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16,
"offset of SwapBuffersWithDamageCHROMIUM height should be 16");
+struct SetSurfaceHandleCHROMIUM {
+ typedef SetSurfaceHandleCHROMIUM ValueType;
+ static const CommandId kCmdId = kSetSurfaceHandleCHROMIUM;
+ 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(GLint _surfaceHandle) {
+ SetHeader();
+ surfaceHandle = _surfaceHandle;
+ }
+
+ void* Set(void* cmd, GLint _surfaceHandle) {
+ static_cast<ValueType*>(cmd)->Init(_surfaceHandle);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ int32_t surfaceHandle;
+};
+
+static_assert(sizeof(SetSurfaceHandleCHROMIUM) == 8,
+ "size of SetSurfaceHandleCHROMIUM should be 8");
+static_assert(offsetof(SetSurfaceHandleCHROMIUM, header) == 0,
+ "offset of SetSurfaceHandleCHROMIUM header should be 0");
+static_assert(offsetof(SetSurfaceHandleCHROMIUM, surfaceHandle) == 4,
+ "offset of SetSurfaceHandleCHROMIUM surfaceHandle should be 4");
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
« 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