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

Side by Side Diff: gpu/command_buffer/service/gles2_cmd_decoder_unittest_framebuffers.cc

Issue 2577293002: Change GetIntegerv(IMPLEMENTATION_COLOR_READ_FORMAT/TYPE) behavior. (Closed)
Patch Set: fix Created 4 years 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
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 3738 matching lines...) Expand 10 before | Expand all | Expand 10 after
3749 GL_NO_ERROR); 3749 GL_NO_ERROR);
3750 3750
3751 typedef GetIntegerv::Result Result; 3751 typedef GetIntegerv::Result Result;
3752 Result* result = static_cast<Result*>(shared_memory_address_); 3752 Result* result = static_cast<Result*>(shared_memory_address_);
3753 GetIntegerv cmd; 3753 GetIntegerv cmd;
3754 3754
3755 result->size = 0; 3755 result->size = 0;
3756 EXPECT_CALL(*gl_, GetError()) 3756 EXPECT_CALL(*gl_, GetError())
3757 .WillOnce(Return(GL_NO_ERROR)) 3757 .WillOnce(Return(GL_NO_ERROR))
3758 .WillOnce(Return(GL_NO_ERROR)) 3758 .WillOnce(Return(GL_NO_ERROR))
3759 .WillOnce(Return(GL_NO_ERROR))
3760 .WillOnce(Return(GL_NO_ERROR))
3761 .WillOnce(Return(GL_NO_ERROR))
3762 .RetiresOnSaturation(); 3759 .RetiresOnSaturation();
3763 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_))
3764 .WillOnce(Return(GL_FRAMEBUFFER_COMPLETE))
3765 .RetiresOnSaturation();
3766 EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(1).RetiresOnSaturation();
3767 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_FORMAT, 3760 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_FORMAT,
3768 shared_memory_id_, 3761 shared_memory_id_,
3769 shared_memory_offset_); 3762 shared_memory_offset_);
3770 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 3763 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
3771 EXPECT_EQ(1, result->GetNumResults()); 3764 EXPECT_EQ(1, result->GetNumResults());
3772 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3765 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3773 3766
3774 result->size = 0; 3767 result->size = 0;
3775 EXPECT_CALL(*gl_, GetError()) 3768 EXPECT_CALL(*gl_, GetError())
3776 .WillOnce(Return(GL_NO_ERROR)) 3769 .WillOnce(Return(GL_NO_ERROR))
3777 .WillOnce(Return(GL_NO_ERROR)) 3770 .WillOnce(Return(GL_NO_ERROR))
3778 .WillOnce(Return(GL_NO_ERROR))
3779 .WillOnce(Return(GL_NO_ERROR))
3780 .WillOnce(Return(GL_NO_ERROR))
3781 .RetiresOnSaturation(); 3771 .RetiresOnSaturation();
3782 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(_))
3783 .Times(0);
3784 EXPECT_CALL(*gl_, GetIntegerv(_, _)).Times(1).RetiresOnSaturation();
3785 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_TYPE, 3772 cmd.Init(GL_IMPLEMENTATION_COLOR_READ_TYPE,
3786 shared_memory_id_, 3773 shared_memory_id_,
3787 shared_memory_offset_); 3774 shared_memory_offset_);
3788 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd)); 3775 EXPECT_EQ(error::kNoError, ExecuteCmd(cmd));
3789 EXPECT_EQ(1, result->GetNumResults()); 3776 EXPECT_EQ(1, result->GetNumResults());
3790 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 3777 EXPECT_EQ(GL_NO_ERROR, GetGLError());
3791 } 3778 }
3792 3779
3793 TEST_P(GLES3DecoderTest, FramebufferTextureLayerNoBoundFramebuffer) { 3780 TEST_P(GLES3DecoderTest, FramebufferTextureLayerNoBoundFramebuffer) {
3794 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId); 3781 DoBindTexture(GL_TEXTURE_3D, client_texture_id_, kServiceTextureId);
(...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after
4052 EXPECT_EQ(GL_NO_ERROR, GetGLError()); 4039 EXPECT_EQ(GL_NO_ERROR, GetGLError());
4053 } 4040 }
4054 } 4041 }
4055 4042
4056 // TODO(gman): PixelStorei 4043 // TODO(gman): PixelStorei
4057 4044
4058 // TODO(gman): SwapBuffers 4045 // TODO(gman): SwapBuffers
4059 4046
4060 } // namespace gles2 4047 } // namespace gles2
4061 } // namespace gpu 4048 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698