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

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

Issue 2163493002: Break glScheduleCALayerCHROMIUM into smaller functions. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@temp37_cleanup_calayeroverlay
Patch Set: Comments from piman. 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 c59462dbf1dc38034aafb1ec0f2f29435a81d5f6..b2c167128c9b16ed2697a09ab2f793e7b27ce3bb 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -4669,26 +4669,40 @@ TEST_F(GLES2FormatTest, ScheduleOverlayPlaneCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, ScheduleCALayerSharedStateCHROMIUM) {
+ cmds::ScheduleCALayerSharedStateCHROMIUM& cmd =
+ *GetBufferAs<cmds::ScheduleCALayerSharedStateCHROMIUM>();
+ void* next_cmd = cmd.Set(&cmd, static_cast<GLfloat>(11),
+ static_cast<GLboolean>(12), static_cast<GLint>(13),
+ static_cast<GLuint>(14), static_cast<GLuint>(15));
+ EXPECT_EQ(
+ static_cast<uint32_t>(cmds::ScheduleCALayerSharedStateCHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLfloat>(11), cmd.opacity);
+ EXPECT_EQ(static_cast<GLboolean>(12), cmd.is_clipped);
+ EXPECT_EQ(static_cast<GLint>(13), cmd.sorting_context_id);
+ EXPECT_EQ(static_cast<GLuint>(14), cmd.shm_id);
+ EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_offset);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, ScheduleCALayerCHROMIUM) {
cmds::ScheduleCALayerCHROMIUM& cmd =
*GetBufferAs<cmds::ScheduleCALayerCHROMIUM>();
- void* next_cmd = cmd.Set(&cmd, static_cast<GLuint>(11),
- static_cast<GLfloat>(12), static_cast<GLuint>(13),
- static_cast<GLuint>(14), static_cast<GLboolean>(15),
- static_cast<GLint>(16), static_cast<GLuint>(17),
- static_cast<GLuint>(18), static_cast<GLuint>(19));
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12),
+ static_cast<GLuint>(13), static_cast<GLuint>(14),
+ static_cast<GLuint>(15), static_cast<GLuint>(16));
EXPECT_EQ(static_cast<uint32_t>(cmds::ScheduleCALayerCHROMIUM::kCmdId),
cmd.header.command);
EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
EXPECT_EQ(static_cast<GLuint>(11), cmd.contents_texture_id);
- EXPECT_EQ(static_cast<GLfloat>(12), cmd.opacity);
- EXPECT_EQ(static_cast<GLuint>(13), cmd.background_color);
- EXPECT_EQ(static_cast<GLuint>(14), cmd.edge_aa_mask);
- EXPECT_EQ(static_cast<GLboolean>(15), cmd.is_clipped);
- EXPECT_EQ(static_cast<GLint>(16), cmd.sorting_context_id);
- EXPECT_EQ(static_cast<GLuint>(17), cmd.filter);
- EXPECT_EQ(static_cast<GLuint>(18), cmd.shm_id);
- EXPECT_EQ(static_cast<GLuint>(19), cmd.shm_offset);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.background_color);
+ EXPECT_EQ(static_cast<GLuint>(13), cmd.edge_aa_mask);
+ EXPECT_EQ(static_cast<GLuint>(14), cmd.filter);
+ EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_id);
+ EXPECT_EQ(static_cast<GLuint>(16), cmd.shm_offset);
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
« no previous file with comments | « gpu/command_buffer/common/gles2_cmd_format_autogen.h ('k') | gpu/command_buffer/common/gles2_cmd_ids_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698