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

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

Issue 2175043002: Add command buffer function glScheduleCALayerFilterEffectsCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: blah nits. Created 4 years, 5 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_test_autogen.h
diff --git a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
index b2c167128c9b16ed2697a09ab2f793e7b27ce3bb..386fab14bcf358fe45f61d20f56a67a1449f3e95 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -4687,6 +4687,26 @@ TEST_F(GLES2FormatTest, ScheduleCALayerSharedStateCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, ScheduleCALayerFilterEffectsCHROMIUMImmediate) {
+ const int kSomeBaseValueToTestWith = 51;
+ static GLCALayerFilterEffect data[] = {
+ static_cast<GLCALayerFilterEffect>(kSomeBaseValueToTestWith + 0),
+ };
+ cmds::ScheduleCALayerFilterEffectsCHROMIUMImmediate& cmd =
+ *GetBufferAs<cmds::ScheduleCALayerFilterEffectsCHROMIUMImmediate>();
+ const GLsizei kNumElements = 1;
+ const size_t kExpectedCmdSize =
+ sizeof(cmd) + kNumElements * sizeof(GLCALayerFilterEffect) * 1;
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLsizei>(1), data);
+ EXPECT_EQ(static_cast<uint32_t>(
+ cmds::ScheduleCALayerFilterEffectsCHROMIUMImmediate::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(kExpectedCmdSize, cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLsizei>(1), cmd.count);
+ CheckBytesWrittenMatchesExpectedSize(
+ next_cmd, sizeof(cmd) + RoundSizeToMultipleOfEntries(sizeof(data)));
+}
+
TEST_F(GLES2FormatTest, ScheduleCALayerCHROMIUM) {
cmds::ScheduleCALayerCHROMIUM& cmd =
*GetBufferAs<cmds::ScheduleCALayerCHROMIUM>();

Powered by Google App Engine
This is Rietveld 408576698