| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" | 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" |
| 6 | 6 |
| 7 #include <limits.h> | 7 #include <limits.h> |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 3652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3663 GL_NO_ERROR); | 3663 GL_NO_ERROR); |
| 3664 | 3664 |
| 3665 typedef GetIntegerv::Result Result; | 3665 typedef GetIntegerv::Result Result; |
| 3666 Result* result = static_cast<Result*>(shared_memory_address_); | 3666 Result* result = static_cast<Result*>(shared_memory_address_); |
| 3667 GetIntegerv cmd; | 3667 GetIntegerv cmd; |
| 3668 | 3668 |
| 3669 result->size = 0; | 3669 result->size = 0; |
| 3670 EXPECT_CALL(*gl_, GetError()) | 3670 EXPECT_CALL(*gl_, GetError()) |
| 3671 .WillOnce(Return(GL_NO_ERROR)) | 3671 .WillOnce(Return(GL_NO_ERROR)) |
| 3672 .WillOnce(Return(GL_NO_ERROR)) | 3672 .WillOnce(Return(GL_NO_ERROR)) |
| 3673 .WillOnce(Return(GL_NO_ERROR)) | |
| 3674 .WillOnce(Return(GL_NO_ERROR)) | |
| 3675 .WillOnce(Return(GL_NO_ERROR)) | |
| 3676 .RetiresOnSaturation(); | 3673 .RetiresOnSaturation(); |
| 3677 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_)) | |
| 3678 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE)) | |
| 3679 .RetiresOnSaturation(); | |
| 3680 EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(1).RetiresOnSaturation(); | |
| 3681 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_FORMAT, | 3674 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_FORMAT, |
| 3682 shared_memory_id_, | 3675 shared_memory_id_, |
| 3683 shared_memory_offset_); | 3676 shared_memory_offset_); |
| 3684 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 3677 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 3685 EXPECT_EQ(1, result->GetNumResults()); | 3678 EXPECT_EQ(1, result->GetNumResults()); |
| 3686 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 3679 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 3687 | 3680 |
| 3688 result->size = 0; | 3681 result->size = 0; |
| 3689 EXPECT_CALL(*gl_, GetError()) | 3682 EXPECT_CALL(*gl_, GetError()) |
| 3690 .WillOnce(Return(GL_NO_ERROR)) | 3683 .WillOnce(Return(GL_NO_ERROR)) |
| 3691 .WillOnce(Return(GL_NO_ERROR)) | 3684 .WillOnce(Return(GL_NO_ERROR)) |
| 3692 .WillOnce(Return(GL_NO_ERROR)) | |
| 3693 .WillOnce(Return(GL_NO_ERROR)) | |
| 3694 .WillOnce(Return(GL_NO_ERROR)) | |
| 3695 .RetiresOnSaturation(); | 3685 .RetiresOnSaturation(); |
| 3696 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_)) | |
| 3697 .Times(0); | |
| 3698 EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(1).RetiresOnSaturation(); | |
| 3699 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_TYPE, | 3686 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_TYPE, |
| 3700 shared_memory_id_, | 3687 shared_memory_id_, |
| 3701 shared_memory_offset_); | 3688 shared_memory_offset_); |
| 3702 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); | 3689 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); |
| 3703 EXPECT_EQ(1, result->GetNumResults()); | 3690 EXPECT_EQ(1, result->GetNumResults()); |
| 3704 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 3691 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 3705 } | 3692 } |
| 3706 | 3693 |
| 3707 TEST_P(GLES3DecoderTest, FramebufferTextureLayerNoBoundFramebuffer) { | 3694 TEST_P(GLES3DecoderTest, FramebufferTextureLayerNoBoundFramebuffer) { |
| 3708 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId); | 3695 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId); |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3966 EXPECT_EQ(GL_NO_ERROR, GetGLError()); | 3953 EXPECT_EQ(GL_NO_ERROR, GetGLError()); |
| 3967 } | 3954 } |
| 3968 } | 3955 } |
| 3969 | 3956 |
| 3970 // TODO(gman): PixelStorei | 3957 // TODO(gman): PixelStorei |
| 3971 | 3958 |
| 3972 // TODO(gman): SwapBuffers | 3959 // TODO(gman): SwapBuffers |
| 3973 | 3960 |
| 3974 } // namespace gles2 | 3961 } // namespace gles2 |
| 3975 } // namespace gpu | 3962 } // namespace gpu |
| OLD | NEW |