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

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

Issue 786123002: Update from https://crrev.com/307330 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 f48e9abec5de96de98ec85a7ecbafa987e4f8d87..3d0eaa2f9efe1669dbdeb6ff8f01df558f571c4e 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
+++ b/gpu/command_buffer/client/gles2_implementation_unittest_autogen.h
@@ -810,6 +810,42 @@ TEST_F(GLES2ImplementationTest, Hint) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+TEST_F(GLES2ImplementationTest, InvalidateFramebuffer) {
+ GLenum data[2][1] = {{0}};
+ struct Cmds {
+ cmds::InvalidateFramebufferImmediate cmd;
+ GLenum data[2][1];
+ };
+
+ Cmds expected;
+ for (int ii = 0; ii < 2; ++ii) {
+ for (int jj = 0; jj < 1; ++jj) {
+ data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
+ }
+ }
+ expected.cmd.Init(GL_FRAMEBUFFER, 2, &data[0][0]);
+ gl_->InvalidateFramebuffer(GL_FRAMEBUFFER, 2, &data[0][0]);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, InvalidateSubFramebuffer) {
+ GLenum data[2][1] = {{0}};
+ struct Cmds {
+ cmds::InvalidateSubFramebufferImmediate cmd;
+ GLenum data[2][1];
+ };
+
+ Cmds expected;
+ for (int ii = 0; ii < 2; ++ii) {
+ for (int jj = 0; jj < 1; ++jj) {
+ data[ii][jj] = static_cast<GLenum>(ii * 1 + jj);
+ }
+ }
+ expected.cmd.Init(GL_FRAMEBUFFER, 2, &data[0][0], 4, 5, 6, 7);
+ gl_->InvalidateSubFramebuffer(GL_FRAMEBUFFER, 2, &data[0][0], 4, 5, 6, 7);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
TEST_F(GLES2ImplementationTest, IsBuffer) {
struct Cmds {
cmds::IsBuffer cmd;
@@ -987,6 +1023,17 @@ TEST_F(GLES2ImplementationTest, PolygonOffset) {
EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
}
+TEST_F(GLES2ImplementationTest, ReadBuffer) {
+ struct Cmds {
+ cmds::ReadBuffer cmd;
+ };
+ Cmds expected;
+ expected.cmd.Init(1);
+
+ gl_->ReadBuffer(1);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
TEST_F(GLES2ImplementationTest, ReleaseShaderCompiler) {
struct Cmds {
cmds::ReleaseShaderCompiler cmd;
« 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