OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |