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

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

Issue 16159004: Hookup driver_bug_workarounds with gl_tests properly. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/feature_info.cc ('k') | gpu/command_buffer/tests/gl_tests_main.cc » ('j') | 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 <algorithm> 7 #include <algorithm>
8 #include <string> 8 #include <string>
9 9
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 278
279 void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion( 279 void TestHelper::SetupFeatureInfoInitExpectationsWithGLVersion(
280 ::gfx::MockGLInterface* gl, 280 ::gfx::MockGLInterface* gl,
281 const char* extensions, 281 const char* extensions,
282 const char* version) { 282 const char* version) {
283 InSequence sequence; 283 InSequence sequence;
284 284
285 EXPECT_CALL(*gl, GetString(GL_EXTENSIONS)) 285 EXPECT_CALL(*gl, GetString(GL_EXTENSIONS))
286 .WillOnce(Return(reinterpret_cast<const uint8*>(extensions))) 286 .WillOnce(Return(reinterpret_cast<const uint8*>(extensions)))
287 .RetiresOnSaturation(); 287 .RetiresOnSaturation();
288 EXPECT_CALL(*gl, GetString(GL_VENDOR))
289 .WillOnce(Return(reinterpret_cast<const uint8*>("")))
290 .RetiresOnSaturation();
291 EXPECT_CALL(*gl, GetString(GL_RENDERER))
292 .WillOnce(Return(reinterpret_cast<const uint8*>("")))
293 .RetiresOnSaturation();
294 EXPECT_CALL(*gl, GetString(GL_VERSION)) 288 EXPECT_CALL(*gl, GetString(GL_VERSION))
295 .WillOnce(Return(reinterpret_cast<const uint8*>(version))) 289 .WillOnce(Return(reinterpret_cast<const uint8*>(version)))
296 .RetiresOnSaturation(); 290 .RetiresOnSaturation();
297 } 291 }
298 292
299 void TestHelper::SetupExpectationsForClearingUniforms( 293 void TestHelper::SetupExpectationsForClearingUniforms(
300 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) { 294 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) {
301 for (size_t ii = 0; ii < num_uniforms; ++ii) { 295 for (size_t ii = 0; ii < num_uniforms; ++ii) {
302 const UniformInfo& info = uniforms[ii]; 296 const UniformInfo& info = uniforms[ii];
303 switch (info.type) { 297 switch (info.type) {
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
550 gfx::SetGLImplementation(implementation); 544 gfx::SetGLImplementation(implementation);
551 } 545 }
552 546
553 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() { 547 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() {
554 gfx::SetGLImplementation(old_implementation_); 548 gfx::SetGLImplementation(old_implementation_);
555 } 549 }
556 550
557 } // namespace gles2 551 } // namespace gles2
558 } // namespace gpu 552 } // namespace gpu
559 553
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/feature_info.cc ('k') | gpu/command_buffer/tests/gl_tests_main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698