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

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

Issue 2849743002: Allow binding multiple textures to one DC Layer overlay. (Closed)
Patch Set: improve test Created 3 years, 8 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 d7094ea1ee3c15e691ded2129dc3da1dfff3ac36..5d1fdddc7e8cfe5be216fca03ec38b92ed281349 100644
--- a/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
+++ b/gpu/command_buffer/common/gles2_cmd_format_test_autogen.h
@@ -4703,22 +4703,33 @@ TEST_F(GLES2FormatTest, ScheduleDCLayerSharedStateCHROMIUM) {
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}
+TEST_F(GLES2FormatTest, SetDCLayerTextureCHROMIUM) {
+ cmds::SetDCLayerTextureCHROMIUM& cmd =
+ *GetBufferAs<cmds::SetDCLayerTextureCHROMIUM>();
+ void* next_cmd =
+ cmd.Set(&cmd, static_cast<GLuint>(11), static_cast<GLuint>(12));
+ EXPECT_EQ(static_cast<uint32_t>(cmds::SetDCLayerTextureCHROMIUM::kCmdId),
+ cmd.header.command);
+ EXPECT_EQ(sizeof(cmd), cmd.header.size * 4u);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.index);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.contents_texture_id);
+ CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
+}
+
TEST_F(GLES2FormatTest, ScheduleDCLayerCHROMIUM) {
cmds::ScheduleDCLayerCHROMIUM& cmd =
*GetBufferAs<cmds::ScheduleDCLayerCHROMIUM>();
- 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));
+ 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));
EXPECT_EQ(static_cast<uint32_t>(cmds::ScheduleDCLayerCHROMIUM::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<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);
+ EXPECT_EQ(static_cast<GLuint>(11), cmd.background_color);
+ EXPECT_EQ(static_cast<GLuint>(12), cmd.edge_aa_mask);
+ EXPECT_EQ(static_cast<GLuint>(13), cmd.filter);
+ EXPECT_EQ(static_cast<GLuint>(14), cmd.shm_id);
+ EXPECT_EQ(static_cast<GLuint>(15), cmd.shm_offset);
CheckBytesWrittenMatchesExpectedSize(next_cmd, sizeof(cmd));
}

Powered by Google App Engine
This is Rietveld 408576698