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

Unified Diff: gpu/command_buffer/client/gles2_implementation_unittest_autogen.h

Issue 169403005: command_buffer: Implement path rendering functions for CHROMIUM_path_rendering (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@nv-pr-02-texgen
Patch Set: fix windows build Created 5 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/client/gles2_implementation_unittest_autogen.h
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
index 7cf70eb61cc002bec3c936d0c162a7c308e368f4..fef96d978da9bc83c4f53a536030a534bf99045f 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -3119,4 +3119,136 @@ TEST_F(GLES2ImplementationTest, MatrixLoadIdentityCHROMIUM) {
gl_->MatrixLoadIdentityCHROMIUM(GL_PATH_PROJECTION_CHROMIUM);
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+// TODO(zmo): Implement unit test for GenPathsCHROMIUM
+
+TEST_F(GLES2ImplementationTest, DeletePathsCHROMIUM) {
+ struct Cmds {
+ cmds::DeletePathsCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, 2);
+
+ gl_->DeletePathsCHROMIUM(1, 2);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, IsPathCHROMIUM) {
+ struct Cmds {
+ cmds::IsPathCHROMIUM cmd;
+ };
+
+ Cmds expected;
+ ExpectedMemoryInfo result1 =
+ GetExpectedResultMemory(sizeof(cmds::IsPathCHROMIUM::Result));
+ expected.cmd.Init(1, result1.id, result1.offset);
+
+ EXPECT_CALL(*command_buffer(), OnFlush())
+ .WillOnce(SetMemory(result1.ptr, uint32_t(GL_TRUE)))
+ .RetiresOnSaturation();
+
+ GLboolean result = gl_->IsPathCHROMIUM(1);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+ EXPECT_TRUE(result);
+}
+// TODO(zmo): Implement unit test for PathCommandsCHROMIUM
+
+TEST_F(GLES2ImplementationTest, PathParameterfCHROMIUM) {
+ struct Cmds {
+ cmds::PathParameterfCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
+
+ gl_->PathParameterfCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, PathParameteriCHROMIUM) {
+ struct Cmds {
+ cmds::PathParameteriCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
+
+ gl_->PathParameteriCHROMIUM(1, GL_PATH_STROKE_WIDTH_CHROMIUM, 3);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, PathStencilFuncCHROMIUM) {
+ struct Cmds {
+ cmds::PathStencilFuncCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(GL_NEVER, 2, 3);
+
+ gl_->PathStencilFuncCHROMIUM(GL_NEVER, 2, 3);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, StencilFillPathCHROMIUM) {
+ struct Cmds {
+ cmds::StencilFillPathCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, GL_INVERT, 3);
+
+ gl_->StencilFillPathCHROMIUM(1, GL_INVERT, 3);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, StencilStrokePathCHROMIUM) {
+ struct Cmds {
+ cmds::StencilStrokePathCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, 2, 3);
+
+ gl_->StencilStrokePathCHROMIUM(1, 2, 3);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, CoverFillPathCHROMIUM) {
+ struct Cmds {
+ cmds::CoverFillPathCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM);
+
+ gl_->CoverFillPathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, CoverStrokePathCHROMIUM) {
+ struct Cmds {
+ cmds::CoverStrokePathCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, GL_CONVEX_HULL_CHROMIUM);
+
+ gl_->CoverStrokePathCHROMIUM(1, GL_CONVEX_HULL_CHROMIUM);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, StencilThenCoverFillPathCHROMIUM) {
+ struct Cmds {
+ cmds::StencilThenCoverFillPathCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, GL_INVERT, 3, GL_CONVEX_HULL_CHROMIUM);
+
+ gl_->StencilThenCoverFillPathCHROMIUM(1, GL_INVERT, 3,
+ GL_CONVEX_HULL_CHROMIUM);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, StencilThenCoverStrokePathCHROMIUM) {
+ struct Cmds {
+ cmds::StencilThenCoverStrokePathCHROMIUM cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1, 2, 3, GL_CONVEX_HULL_CHROMIUM);
+
+ gl_->StencilThenCoverStrokePathCHROMIUM(1, 2, 3, GL_CONVEX_HULL_CHROMIUM);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_UNITTEST_AUTOGEN_H_
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation_impl_autogen.h ('k') | gpu/command_buffer/client/gles2_interface_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698