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

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

Issue 2302393002: Support swap damage rect using eglSwapBuffersWithDamageKHR (Closed)
Patch Set: Update GLSurfaceAdapter Created 4 years, 3 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 fdafab23b0e0d4289a743b5b6748811c7c9dbc6e..3a8ba35913f781030ad6ed9a85476e6bed78c936 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -15451,4 +15451,49 @@ static_assert(offsetof(UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate,
"offset of UniformMatrix4fvStreamTextureMatrixCHROMIUMImmediate "
"transpose should be 8");
+struct SwapBuffersWithDamageCHROMIUM {
+ typedef SwapBuffersWithDamageCHROMIUM ValueType;
+ static const CommandId kCmdId = kSwapBuffersWithDamageCHROMIUM;
+ 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 _x, GLint _y, GLint _width, GLint _height) {
+ SetHeader();
+ x = _x;
+ y = _y;
+ width = _width;
+ height = _height;
+ }
+
+ void* Set(void* cmd, GLint _x, GLint _y, GLint _width, GLint _height) {
+ static_cast<ValueType*>(cmd)->Init(_x, _y, _width, _height);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ int32_t x;
+ int32_t y;
+ int32_t width;
+ int32_t height;
+};
+
+static_assert(sizeof(SwapBuffersWithDamageCHROMIUM) == 20,
+ "size of SwapBuffersWithDamageCHROMIUM should be 20");
+static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, header) == 0,
+ "offset of SwapBuffersWithDamageCHROMIUM header should be 0");
+static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, x) == 4,
+ "offset of SwapBuffersWithDamageCHROMIUM x should be 4");
+static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, y) == 8,
+ "offset of SwapBuffersWithDamageCHROMIUM y should be 8");
+static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12,
+ "offset of SwapBuffersWithDamageCHROMIUM width should be 12");
+static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16,
+ "offset of SwapBuffersWithDamageCHROMIUM height should be 16");
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_
« no previous file with comments | « gpu/command_buffer/common/capabilities.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