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

Side by Side Diff: gpu/command_buffer/client/gles2_implementation_unittest.cc

Issue 2257533007: Autogenerate CreateAndConsumeTextureCHROMIUM handler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Tests for GLES2Implementation. 5 // Tests for GLES2Implementation.
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 8
9 #include <GLES2/gl2.h> 9 #include <GLES2/gl2.h>
10 #include <GLES2/gl2ext.h> 10 #include <GLES2/gl2ext.h>
(...skipping 3713 matching lines...) Expand 10 before | Expand all | Expand 10 after
3724 3724
3725 Mailbox mailbox = Mailbox::Generate(); 3725 Mailbox mailbox = Mailbox::Generate();
3726 Cmds expected; 3726 Cmds expected;
3727 expected.cmd.Init(GL_TEXTURE_2D, mailbox.name); 3727 expected.cmd.Init(GL_TEXTURE_2D, mailbox.name);
3728 gl_->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); 3728 gl_->ConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
3729 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 3729 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3730 } 3730 }
3731 3731
3732 TEST_F(GLES2ImplementationTest, CreateAndConsumeTextureCHROMIUM) { 3732 TEST_F(GLES2ImplementationTest, CreateAndConsumeTextureCHROMIUM) {
3733 struct Cmds { 3733 struct Cmds {
3734 cmds::CreateAndConsumeTextureCHROMIUMImmediate cmd; 3734 cmds::CreateAndConsumeTextureINTERNALImmediate cmd;
3735 GLbyte data[64]; 3735 GLbyte data[64];
3736 }; 3736 };
3737 3737
3738 Mailbox mailbox = Mailbox::Generate(); 3738 Mailbox mailbox = Mailbox::Generate();
3739 Cmds expected; 3739 Cmds expected;
3740 expected.cmd.Init(GL_TEXTURE_2D, kTexturesStartId, mailbox.name); 3740 expected.cmd.Init(GL_TEXTURE_2D, kTexturesStartId, mailbox.name);
3741 GLuint id = gl_->CreateAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name); 3741 GLuint id = gl_->CreateAndConsumeTextureCHROMIUM(GL_TEXTURE_2D, mailbox.name);
3742 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); 3742 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected)));
3743 EXPECT_EQ(kTexturesStartId, id); 3743 EXPECT_EQ(kTexturesStartId, id);
3744 } 3744 }
(...skipping 875 matching lines...) Expand 10 before | Expand all | Expand 10 after
4620 EXPECT_TRUE(gl_->AnyClientsVisible()); 4620 EXPECT_TRUE(gl_->AnyClientsVisible());
4621 gl_->SetClientVisible(1, false); 4621 gl_->SetClientVisible(1, false);
4622 EXPECT_FALSE(gl_->AnyClientsVisible()); 4622 EXPECT_FALSE(gl_->AnyClientsVisible());
4623 } 4623 }
4624 4624
4625 #include "base/macros.h" 4625 #include "base/macros.h"
4626 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h" 4626 #include "gpu/command_buffer/client/gles2_implementation_unittest_autogen.h"
4627 4627
4628 } // namespace gles2 4628 } // namespace gles2
4629 } // namespace gpu 4629 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/client/gles2_implementation.cc ('k') | gpu/command_buffer/cmd_buffer_functions.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698