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

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

Issue 2067503003: Add a new command buffer function glScheduleCALayerInUseQueryCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Include gl_image.h Created 4 years, 6 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 6c4b99006f72da9eb7e2ccab4857315b86af4788..df2c7b2640fe253679bf30869ecfe9ac63831713 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_autogen.h
@@ -13649,6 +13649,50 @@ static_assert(offsetof(ScheduleCALayerCHROMIUM, shm_id) == 32,
static_assert(offsetof(ScheduleCALayerCHROMIUM, shm_offset) == 36,
"offset of ScheduleCALayerCHROMIUM shm_offset should be 36");
+struct ScheduleCALayerInUseQueryCHROMIUMImmediate {
+ typedef ScheduleCALayerInUseQueryCHROMIUMImmediate ValueType;
+ static const CommandId kCmdId = kScheduleCALayerInUseQueryCHROMIUMImmediate;
+ static const cmd::ArgFlags kArgFlags = cmd::kAtLeastN;
+ static const uint8_t cmd_flags = CMD_FLAG_SET_TRACE_LEVEL(3);
+
+ static uint32_t ComputeDataSize(GLsizei count) {
+ return static_cast<uint32_t>(sizeof(GLuint) * 1 * count); // NOLINT
+ }
+
+ static uint32_t ComputeSize(GLsizei count) {
+ return static_cast<uint32_t>(sizeof(ValueType) +
+ ComputeDataSize(count)); // NOLINT
+ }
+
+ void SetHeader(GLsizei count) {
+ header.SetCmdByTotalSize<ValueType>(ComputeSize(count));
+ }
+
+ void Init(GLsizei _count, const GLuint* _textures) {
+ SetHeader(_count);
+ count = _count;
+ memcpy(ImmediateDataAddress(this), _textures, ComputeDataSize(_count));
+ }
+
+ void* Set(void* cmd, GLsizei _count, const GLuint* _textures) {
+ static_cast<ValueType*>(cmd)->Init(_count, _textures);
+ const uint32_t size = ComputeSize(_count);
+ return NextImmediateCmdAddressTotalSize<ValueType>(cmd, size);
+ }
+
+ gpu::CommandHeader header;
+ int32_t count;
+};
+
+static_assert(sizeof(ScheduleCALayerInUseQueryCHROMIUMImmediate) == 8,
+ "size of ScheduleCALayerInUseQueryCHROMIUMImmediate should be 8");
+static_assert(
+ offsetof(ScheduleCALayerInUseQueryCHROMIUMImmediate, header) == 0,
+ "offset of ScheduleCALayerInUseQueryCHROMIUMImmediate header should be 0");
+static_assert(
+ offsetof(ScheduleCALayerInUseQueryCHROMIUMImmediate, count) == 4,
+ "offset of ScheduleCALayerInUseQueryCHROMIUMImmediate count should be 4");
+
struct CommitOverlayPlanesCHROMIUM {
typedef CommitOverlayPlanesCHROMIUM ValueType;
static const CommandId kCmdId = kCommitOverlayPlanesCHROMIUM;
« 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