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

Unified Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 10 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.cc
diff --git a/gpu/command_buffer/client/gles2_implementation_unittest.cc b/gpu/command_buffer/client/gles2_implementation_unittest.cc
index 61033094ccddddab51e80cbbe7d71939e197904e..b6803baa136c8dde4da90286da9f51c44fb5365e 100644
--- a/gpu/command_buffer/client/gles2_implementation_unittest.cc
+++ b/gpu/command_buffer/client/gles2_implementation_unittest.cc
@@ -2845,6 +2845,31 @@ TEST_F(GLES2ImplementationTest, Enable) {
EXPECT_TRUE(NoCommandsWritten());
}
+TEST_F(GLES2ImplementationTest, ConsumeTextureCHROMIUM) {
+ struct Cmds {
+ cmds::ConsumeTextureCHROMIUMImmediate cmd;
+ GLbyte data[64];
+ };
+
+ Mailbox mailbox = Mailbox::Generate();
+ Cmds expected;
+ expected.cmd.Init(GL_TEXTURE_2D, mailbox.name);
+ gl_->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
+
+TEST_F(GLES2ImplementationTest, ProduceTextureCHROMIUM) {
+ struct Cmds {
+ cmds::ProduceTextureCHROMIUMImmediate cmd;
+ GLbyte data[64];
+ };
+
+ Mailbox mailbox = Mailbox::Generate();
+ Cmds expected;
+ expected.cmd.Init(GL_TEXTURE_2D, mailbox.name);
+ gl_->ProduceTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
+ EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
+}
#include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"

Powered by Google App Engine
This is Rietveld 408576698