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

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

Issue 169603002: Add initial support for NV_path_rendering extension to gpu command buffer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address review comment Created 6 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
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 d87dc8b1d01c126398e5cc1afa6b2540f2a8de8a..3dbe44d1724d59d2f34432c87feb606c059a9aa2 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -9106,4 +9106,77 @@ COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_width) == 40,
COMPILE_ASSERT(offsetof(ScheduleOverlayPlaneCHROMIUM, uv_height) == 44,
OffsetOf_ScheduleOverlayPlaneCHROMIUM_uv_height_not_44);
+struct MatrixLoadfCHROMIUMImmediate {
+ typedef MatrixLoadfCHROMIUMImmediate ValueType;
+ static const CommandId kCmdId = kMatrixLoadfCHROMIUMImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8 cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeDataSize() {
+ return static_cast<uint32_t>(sizeof(GLfloat) * 16); // NOLINT
+ }
+
+ static uint32_t ComputeSize() {
+ return static_cast<uint32_t>(sizeof(ValueType) +
+ ComputeDataSize()); // NOLINT
+ }
+
+ void SetHeader() { header.SetCmdByTotalSize<ValueType>(ComputeSize()); }
+
+ void Init(GLenum _matrixMode, const GLfloat* _m) {
+ SetHeader();
+ matrixMode = _matrixMode;
+ memcpy(ImmediateDataAddress(this), _m, ComputeDataSize());
+ }
+
+ void* Set(void* cmd, GLenum _matrixMode, const GLfloat* _m) {
+ static_cast<ValueType*>(cmd)->Init(_matrixMode, _m);
+ const uint32_t size = ComputeSize();
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t matrixMode;
+};
+
+COMPILE_ASSERT(sizeof(MatrixLoadfCHROMIUMImmediate) == 8,
+ Sizeof_MatrixLoadfCHROMIUMImmediate_is_not_8);
+COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, header) == 0,
+ OffsetOf_MatrixLoadfCHROMIUMImmediate_header_not_0);
+COMPILE_ASSERT(offsetof(MatrixLoadfCHROMIUMImmediate, matrixMode) == 4,
+ OffsetOf_MatrixLoadfCHROMIUMImmediate_matrixMode_not_4);
+
+struct MatrixLoadIdentityCHROMIUM {
+ typedef MatrixLoadIdentityCHROMIUM ValueType;
+ static const CommandId kCmdId = kMatrixLoadIdentityCHROMIUM;
+ static const cmd::ArgFlags kArgFlags = cmd::kFixed;
+ static const uint8 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(GLenum _matrixMode) {
+ SetHeader();
+ matrixMode = _matrixMode;
+ }
+
+ void* Set(void* cmd, GLenum _matrixMode) {
+ static_cast<ValueType*>(cmd)->Init(_matrixMode);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t matrixMode;
+};
+
+COMPILE_ASSERT(sizeof(MatrixLoadIdentityCHROMIUM) == 8,
+ Sizeof_MatrixLoadIdentityCHROMIUM_is_not_8);
+COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, header) == 0,
+ OffsetOf_MatrixLoadIdentityCHROMIUM_header_not_0);
+COMPILE_ASSERT(offsetof(MatrixLoadIdentityCHROMIUM, matrixMode) == 4,
+ OffsetOf_MatrixLoadIdentityCHROMIUM_matrixMode_not_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