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

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

Issue 6028005: Make CopyTexImage2D and CopyTexSubImage2D fail if... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 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 | Annotate | Revision Log
OLDNEW
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 #include "gpu/command_buffer/service/gles2_cmd_decoder.h" 5 #include "gpu/command_buffer/service/gles2_cmd_decoder.h"
6 6
7 #include "gpu/command_buffer/common/gl_mock.h" 7 #include "gpu/command_buffer/common/gl_mock.h"
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" 8 #include "gpu/command_buffer/common/gles2_cmd_format.h"
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h"
10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h" 10 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_base.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd)); 81 EXPECT_EQ(error::kNoError, ExecuteCmd(attach_cmd));
82 } 82 }
83 }; 83 };
84 84
85 template <> 85 template <>
86 void GLES2DecoderTestBase::SpecializedSetup<FramebufferRenderbuffer, 0>( 86 void GLES2DecoderTestBase::SpecializedSetup<FramebufferRenderbuffer, 0>(
87 bool valid) { 87 bool valid) {
88 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, 88 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_,
89 kServiceFramebufferId); 89 kServiceFramebufferId);
90 if (valid) { 90 if (valid) {
91 EXPECT_CALL(*gl_, GetError())
92 .WillOnce(Return(GL_NO_ERROR))
93 .RetiresOnSaturation();
91 // Return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT so the code 94 // Return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT so the code
92 // doesn't try to clear the buffer. That is tested else where. 95 // doesn't try to clear the buffer. That is tested else where.
93 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) 96 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
94 .WillOnce(Return(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT)) 97 .WillOnce(Return(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT))
95 .RetiresOnSaturation(); 98 .RetiresOnSaturation();
99 EXPECT_CALL(*gl_, GetError())
100 .WillOnce(Return(GL_NO_ERROR))
101 .RetiresOnSaturation();
96 } 102 }
97 }; 103 };
98 104
99 template <> 105 template <>
100 void GLES2DecoderTestBase::SpecializedSetup<FramebufferTexture2D, 0>( 106 void GLES2DecoderTestBase::SpecializedSetup<FramebufferTexture2D, 0>(
101 bool valid) { 107 bool valid) {
102 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, 108 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_,
103 kServiceFramebufferId); 109 kServiceFramebufferId);
104 if (valid) { 110 if (valid) {
111 EXPECT_CALL(*gl_, GetError())
112 .WillOnce(Return(GL_NO_ERROR))
113 .RetiresOnSaturation();
105 // Return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT so the code 114 // Return GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT so the code
106 // doesn't try to clear the buffer. That is tested else where. 115 // doesn't try to clear the buffer. That is tested else where.
107 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER)) 116 EXPECT_CALL(*gl_, CheckFramebufferStatusEXT(GL_FRAMEBUFFER))
108 .WillOnce(Return(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT)) 117 .WillOnce(Return(GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT))
109 .RetiresOnSaturation(); 118 .RetiresOnSaturation();
119 EXPECT_CALL(*gl_, GetError())
120 .WillOnce(Return(GL_NO_ERROR))
121 .RetiresOnSaturation();
110 } 122 }
111 }; 123 };
112 124
113 template <> 125 template <>
114 void GLES2DecoderTestBase::SpecializedSetup<GetFramebufferAttachmentParameteriv, 126 void GLES2DecoderTestBase::SpecializedSetup<GetFramebufferAttachmentParameteriv,
115 0>(bool /* valid */) { 127 0>(bool /* valid */) {
116 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_, 128 DoBindFramebuffer(GL_FRAMEBUFFER, client_framebuffer_id_,
117 kServiceFramebufferId); 129 kServiceFramebufferId);
118 }; 130 };
119 131
(...skipping 21 matching lines...) Expand all
141 .WillOnce(Return(GL_NO_ERROR)) 153 .WillOnce(Return(GL_NO_ERROR))
142 .RetiresOnSaturation(); 154 .RetiresOnSaturation();
143 } 155 }
144 }; 156 };
145 157
146 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h" 158 #include "gpu/command_buffer/service/gles2_cmd_decoder_unittest_1_autogen.h"
147 159
148 } // namespace gles2 160 } // namespace gles2
149 } // namespace gpu 161 } // namespace gpu
150 162
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698