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

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

Issue 2627323007: Migrate WebGL contexts on backgrounded tabs to the integrated GPU.
Patch Set: 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 c701dd4de33cd2b32bbe31bb6ea3935bfb0fe923..cbd02d2418061cb901705e0d310a6b84f72997b9 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -15678,4 +15678,37 @@ static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, width) == 12,
static_assert(offsetof(SwapBuffersWithDamageCHROMIUM, height) == 16,
"offset of SwapBuffersWithDamageCHROMIUM height should be 16");
+struct PerformanceHintCHROMIUM {
+ typedef PerformanceHintCHROMIUM ValueType;
+ static const CommandId kCmdId = kPerformanceHintCHROMIUM;
+ 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(GLenum _mode) {
+ SetHeader();
+ mode = _mode;
+ }
+
+ void* Set(void* cmd, GLenum _mode) {
+ static_cast<ValueType*>(cmd)->Init(_mode);
+ return NextCmdAddress<ValueType>(cmd);
+ }
+
+ gpu::CommandHeader header;
+ uint32_t mode;
+};
+
+static_assert(sizeof(PerformanceHintCHROMIUM) == 8,
+ "size of PerformanceHintCHROMIUM should be 8");
+static_assert(offsetof(PerformanceHintCHROMIUM, header) == 0,
+ "offset of PerformanceHintCHROMIUM header should be 0");
+static_assert(offsetof(PerformanceHintCHROMIUM, mode) == 4,
+ "offset of PerformanceHintCHROMIUM mode should be 4");
+
#endif // GPU_COMMAND_BUFFER_COMMON_GLES2_CMD_FORMAT_AUTOGEN_H_

Powered by Google App Engine
This is Rietveld 408576698