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

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

Issue 10381137: Don't enable occlusion query on Linux with Intel drivers. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 months 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
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('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 (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 #include "gpu/command_buffer/service/test_helper.h" 5 #include "gpu/command_buffer/service/test_helper.h"
6 6
7 #include "base/string_number_conversions.h" 7 #include "base/string_number_conversions.h"
8 #include "base/string_tokenizer.h" 8 #include "base/string_tokenizer.h"
9 #include "gpu/command_buffer/common/gl_mock.h" 9 #include "gpu/command_buffer/common/gl_mock.h"
10 #include "gpu/command_buffer/common/types.h" 10 #include "gpu/command_buffer/common/types.h"
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 .RetiresOnSaturation(); 183 .RetiresOnSaturation();
184 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, _)) 184 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, _))
185 .WillOnce(SetArgumentPointee<1>(kNumTextureUnits)) 185 .WillOnce(SetArgumentPointee<1>(kNumTextureUnits))
186 .RetiresOnSaturation(); 186 .RetiresOnSaturation();
187 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_SIZE, _)) 187 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_SIZE, _))
188 .WillOnce(SetArgumentPointee<1>(kMaxTextureSize)) 188 .WillOnce(SetArgumentPointee<1>(kMaxTextureSize))
189 .RetiresOnSaturation(); 189 .RetiresOnSaturation();
190 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, _)) 190 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_CUBE_MAP_TEXTURE_SIZE, _))
191 .WillOnce(SetArgumentPointee<1>(kMaxCubeMapTextureSize)) 191 .WillOnce(SetArgumentPointee<1>(kMaxCubeMapTextureSize))
192 .RetiresOnSaturation(); 192 .RetiresOnSaturation();
193
194 #if defined(OS_MACOSX)
195 EXPECT_CALL(*gl, GetString(GL_VENDOR))
196 .WillOnce(Return(reinterpret_cast<const uint8*>("")))
197 .RetiresOnSaturation();
198 #endif
199
200 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, _)) 193 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, _))
201 .WillOnce(SetArgumentPointee<1>(kMaxTextureImageUnits)) 194 .WillOnce(SetArgumentPointee<1>(kMaxTextureImageUnits))
202 .RetiresOnSaturation(); 195 .RetiresOnSaturation();
203 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, _)) 196 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, _))
204 .WillOnce(SetArgumentPointee<1>(kMaxVertexTextureImageUnits)) 197 .WillOnce(SetArgumentPointee<1>(kMaxVertexTextureImageUnits))
205 .RetiresOnSaturation(); 198 .RetiresOnSaturation();
206 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, _)) 199 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, _))
207 .WillOnce(SetArgumentPointee<1>(kMaxFragmentUniformComponents)) 200 .WillOnce(SetArgumentPointee<1>(kMaxFragmentUniformComponents))
208 .RetiresOnSaturation(); 201 .RetiresOnSaturation();
209 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VARYING_FLOATS, _)) 202 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VARYING_FLOATS, _))
210 .WillOnce(SetArgumentPointee<1>(kMaxVaryingFloats)) 203 .WillOnce(SetArgumentPointee<1>(kMaxVaryingFloats))
211 .RetiresOnSaturation(); 204 .RetiresOnSaturation();
212 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, _)) 205 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, _))
213 .WillOnce(SetArgumentPointee<1>(kMaxVertexUniformComponents)) 206 .WillOnce(SetArgumentPointee<1>(kMaxVertexUniformComponents))
214 .RetiresOnSaturation(); 207 .RetiresOnSaturation();
215 208
216 SetupTextureManagerInitExpectations(gl, extensions); 209 SetupTextureManagerInitExpectations(gl, extensions);
217 } 210 }
218 211
219 void TestHelper::SetupFeatureInfoInitExpectations( 212 void TestHelper::SetupFeatureInfoInitExpectations(
220 ::gfx::MockGLInterface* gl, const char* extensions) { 213 ::gfx::MockGLInterface* gl, const char* extensions) {
214 SetupFeatureInfoInitExpectationsWithVendor(gl, extensions, "");
215 }
216
217 void TestHelper::SetupFeatureInfoInitExpectationsWithVendor(
218 ::gfx::MockGLInterface* gl, const char* extensions, const char* vendor) {
221 InSequence sequence; 219 InSequence sequence;
222 220
223 EXPECT_CALL(*gl, GetString(GL_EXTENSIONS)) 221 EXPECT_CALL(*gl, GetString(GL_EXTENSIONS))
224 .WillOnce(Return(reinterpret_cast<const uint8*>(extensions))) 222 .WillOnce(Return(reinterpret_cast<const uint8*>(extensions)))
225 .RetiresOnSaturation(); 223 .RetiresOnSaturation();
224 EXPECT_CALL(*gl, GetString(GL_VENDOR))
225 .WillOnce(Return(reinterpret_cast<const uint8*>(vendor)))
226 .RetiresOnSaturation();
226 } 227 }
227 228
228 void TestHelper::SetupExpectationsForClearingUniforms( 229 void TestHelper::SetupExpectationsForClearingUniforms(
229 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) { 230 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) {
230 for (size_t ii = 0; ii < num_uniforms; ++ii) { 231 for (size_t ii = 0; ii < num_uniforms; ++ii) {
231 const UniformInfo& info = uniforms[ii]; 232 const UniformInfo& info = uniforms[ii];
232 switch (info.type) { 233 switch (info.type) {
233 case GL_FLOAT: 234 case GL_FLOAT:
234 EXPECT_CALL(*gl, Uniform1fv(info.real_location, info.size, _)) 235 EXPECT_CALL(*gl, Uniform1fv(info.real_location, info.size, _))
235 .Times(1) 236 .Times(1)
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
398 } 399 }
399 } 400 }
400 } 401 }
401 } 402 }
402 } 403 }
403 404
404 405
405 } // namespace gles2 406 } // namespace gles2
406 } // namespace gpu 407 } // namespace gpu
407 408
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/test_helper.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698