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

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

Issue 195973002: Change DCHECK_IS_ON() to DCHECK_IS_ON (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Keep a comment Created 6 years, 9 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
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 349 matching lines...) Expand 10 before | Expand all | Expand 10 after
360 .RetiresOnSaturation(); 360 .RetiresOnSaturation();
361 EXPECT_CALL(*gl, DeleteTextures(1, _)) 361 EXPECT_CALL(*gl, DeleteTextures(1, _))
362 .Times(1) 362 .Times(1)
363 .RetiresOnSaturation(); 363 .RetiresOnSaturation();
364 EXPECT_CALL(*gl, BindFramebufferEXT(GL_FRAMEBUFFER, gl_ids[0])) 364 EXPECT_CALL(*gl, BindFramebufferEXT(GL_FRAMEBUFFER, gl_ids[0]))
365 .Times(1) 365 .Times(1)
366 .RetiresOnSaturation(); 366 .RetiresOnSaturation();
367 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, gl_ids[0])) 367 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, gl_ids[0]))
368 .Times(1) 368 .Times(1)
369 .RetiresOnSaturation(); 369 .RetiresOnSaturation();
370 if (DCHECK_IS_ON()) { 370 #if DCHECK_IS_ON
371 EXPECT_CALL(*gl, GetError()) 371 EXPECT_CALL(*gl, GetError())
372 .WillOnce(Return(GL_NO_ERROR)) 372 .WillOnce(Return(GL_NO_ERROR))
373 .RetiresOnSaturation(); 373 .RetiresOnSaturation();
374 } 374 #endif
375 } 375 }
376 } 376 }
377 377
378 void TestHelper::SetupExpectationsForClearingUniforms( 378 void TestHelper::SetupExpectationsForClearingUniforms(
379 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) { 379 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) {
380 for (size_t ii = 0; ii < num_uniforms; ++ii) { 380 for (size_t ii = 0; ii < num_uniforms; ++ii) {
381 const UniformInfo& info = uniforms[ii]; 381 const UniformInfo& info = uniforms[ii];
382 switch (info.type) { 382 switch (info.type) {
383 case GL_FLOAT: 383 case GL_FLOAT:
384 EXPECT_CALL(*gl, Uniform1fv(info.real_location, info.size, _)) 384 EXPECT_CALL(*gl, Uniform1fv(info.real_location, info.size, _))
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 gfx::SetGLImplementation(implementation); 629 gfx::SetGLImplementation(implementation);
630 } 630 }
631 631
632 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() { 632 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() {
633 gfx::SetGLImplementation(old_implementation_); 633 gfx::SetGLImplementation(old_implementation_);
634 } 634 }
635 635
636 } // namespace gles2 636 } // namespace gles2
637 } // namespace gpu 637 } // namespace gpu
638 638
OLDNEW
« no previous file with comments | « content/renderer/media/webmediaplayer_impl.cc ('k') | gpu/command_buffer/tests/gl_shared_resources_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698