| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 the Command Buffer Helper. | 5 // Tests for the Command Buffer Helper. |
| 6 | 6 |
| 7 #include "gpu/command_buffer/client/gles2_implementation.h" | 7 #include "gpu/command_buffer/client/gles2_implementation.h" |
| 8 #include "gpu/command_buffer/common/command_buffer.h" | 8 #include "gpu/command_buffer/common/command_buffer.h" |
| 9 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
| (...skipping 627 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 638 EXPECT_CALL(*command_buffer_, OnFlush(_)) | 638 EXPECT_CALL(*command_buffer_, OnFlush(_)) |
| 639 .WillOnce(SetMemory(GLuint(GL_NO_ERROR))) | 639 .WillOnce(SetMemory(GLuint(GL_NO_ERROR))) |
| 640 .RetiresOnSaturation(); | 640 .RetiresOnSaturation(); |
| 641 | 641 |
| 642 gl_->BindBuffer( | 642 gl_->BindBuffer( |
| 643 GL_ARRAY_BUFFER, | 643 GL_ARRAY_BUFFER, |
| 644 GLES2Implementation::kClientSideArrayId); | 644 GLES2Implementation::kClientSideArrayId); |
| 645 gl_->BindBuffer( | 645 gl_->BindBuffer( |
| 646 GL_ARRAY_BUFFER, | 646 GL_ARRAY_BUFFER, |
| 647 GLES2Implementation::kClientSideElementArrayId); | 647 GLES2Implementation::kClientSideElementArrayId); |
| 648 gl_->BindFramebuffer( | |
| 649 GL_FRAMEBUFFER, | |
| 650 GLES2Implementation::kClientSideArrayId); | |
| 651 gl_->BindFramebuffer( | |
| 652 GL_FRAMEBUFFER, | |
| 653 GLES2Implementation::kClientSideElementArrayId); | |
| 654 gl_->BindRenderbuffer( | |
| 655 GL_RENDERBUFFER, | |
| 656 GLES2Implementation::kClientSideArrayId); | |
| 657 gl_->BindRenderbuffer( | |
| 658 GL_RENDERBUFFER, | |
| 659 GLES2Implementation::kClientSideElementArrayId); | |
| 660 gl_->BindTexture( | |
| 661 GL_TEXTURE_2D, | |
| 662 GLES2Implementation::kClientSideArrayId); | |
| 663 gl_->BindTexture( | |
| 664 GL_TEXTURE_2D, | |
| 665 GLES2Implementation::kClientSideElementArrayId); | |
| 666 GLenum err = gl_->GetError(); | 648 GLenum err = gl_->GetError(); |
| 667 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), err); | 649 EXPECT_EQ(static_cast<GLenum>(GL_INVALID_OPERATION), err); |
| 668 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); | 650 EXPECT_EQ(0, memcmp(&expected, commands_, sizeof(expected))); |
| 669 } | 651 } |
| 670 | 652 |
| 671 #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_BUFFERS) | 653 #endif // defined(GLES2_SUPPORT_CLIENT_SIDE_BUFFERS) |
| 672 | 654 |
| 673 | 655 |
| 674 } // namespace gles2 | 656 } // namespace gles2 |
| 675 } // namespace gpu | 657 } // namespace gpu |
| 676 | 658 |
| 677 | 659 |
| OLD | NEW |