| OLD | NEW |
| 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 393 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 404 .RetiresOnSaturation(); | 404 .RetiresOnSaturation(); |
| 405 EXPECT_CALL(*gl, DeleteTextures(1, _)) | 405 EXPECT_CALL(*gl, DeleteTextures(1, _)) |
| 406 .Times(1) | 406 .Times(1) |
| 407 .RetiresOnSaturation(); | 407 .RetiresOnSaturation(); |
| 408 EXPECT_CALL(*gl, BindFramebufferEXT(GL_FRAMEBUFFER, fb_ids[0])) | 408 EXPECT_CALL(*gl, BindFramebufferEXT(GL_FRAMEBUFFER, fb_ids[0])) |
| 409 .Times(1) | 409 .Times(1) |
| 410 .RetiresOnSaturation(); | 410 .RetiresOnSaturation(); |
| 411 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, tx_ids[0])) | 411 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, tx_ids[0])) |
| 412 .Times(1) | 412 .Times(1) |
| 413 .RetiresOnSaturation(); | 413 .RetiresOnSaturation(); |
| 414 #if DCHECK_IS_ON | 414 #if DCHECK_IS_ON() |
| 415 EXPECT_CALL(*gl, GetError()) | 415 EXPECT_CALL(*gl, GetError()) |
| 416 .WillOnce(Return(GL_NO_ERROR)) | 416 .WillOnce(Return(GL_NO_ERROR)) |
| 417 .RetiresOnSaturation(); | 417 .RetiresOnSaturation(); |
| 418 #endif | 418 #endif |
| 419 } | 419 } |
| 420 | 420 |
| 421 if (strstr(extensions, "GL_EXT_draw_buffers") || | 421 if (strstr(extensions, "GL_EXT_draw_buffers") || |
| 422 strstr(extensions, "GL_ARB_draw_buffers") || | 422 strstr(extensions, "GL_ARB_draw_buffers") || |
| 423 (is_es3 && strstr(extensions, "GL_NV_draw_buffers"))) { | 423 (is_es3 && strstr(extensions, "GL_NV_draw_buffers"))) { |
| 424 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _)) | 424 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS_EXT, _)) |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 468 .RetiresOnSaturation(); | 468 .RetiresOnSaturation(); |
| 469 EXPECT_CALL(*gl, DeleteTextures(1, _)) | 469 EXPECT_CALL(*gl, DeleteTextures(1, _)) |
| 470 .Times(1) | 470 .Times(1) |
| 471 .RetiresOnSaturation(); | 471 .RetiresOnSaturation(); |
| 472 EXPECT_CALL(*gl, BindFramebufferEXT(GL_FRAMEBUFFER, fb_ids[0])) | 472 EXPECT_CALL(*gl, BindFramebufferEXT(GL_FRAMEBUFFER, fb_ids[0])) |
| 473 .Times(1) | 473 .Times(1) |
| 474 .RetiresOnSaturation(); | 474 .RetiresOnSaturation(); |
| 475 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, tx_ids[0])) | 475 EXPECT_CALL(*gl, BindTexture(GL_TEXTURE_2D, tx_ids[0])) |
| 476 .Times(1) | 476 .Times(1) |
| 477 .RetiresOnSaturation(); | 477 .RetiresOnSaturation(); |
| 478 #if DCHECK_IS_ON | 478 #if DCHECK_IS_ON() |
| 479 EXPECT_CALL(*gl, GetError()) | 479 EXPECT_CALL(*gl, GetError()) |
| 480 .WillOnce(Return(GL_NO_ERROR)) | 480 .WillOnce(Return(GL_NO_ERROR)) |
| 481 .RetiresOnSaturation(); | 481 .RetiresOnSaturation(); |
| 482 #endif | 482 #endif |
| 483 } | 483 } |
| 484 } | 484 } |
| 485 | 485 |
| 486 void TestHelper::SetupExpectationsForClearingUniforms( | 486 void TestHelper::SetupExpectationsForClearingUniforms( |
| 487 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) { | 487 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms) { |
| 488 for (size_t ii = 0; ii < num_uniforms; ++ii) { | 488 for (size_t ii = 0; ii < num_uniforms; ++ii) { |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 gfx::SetGLImplementation(implementation); | 829 gfx::SetGLImplementation(implementation); |
| 830 } | 830 } |
| 831 | 831 |
| 832 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() { | 832 ScopedGLImplementationSetter::~ScopedGLImplementationSetter() { |
| 833 gfx::SetGLImplementation(old_implementation_); | 833 gfx::SetGLImplementation(old_implementation_); |
| 834 } | 834 } |
| 835 | 835 |
| 836 } // namespace gles2 | 836 } // namespace gles2 |
| 837 } // namespace gpu | 837 } // namespace gpu |
| 838 | 838 |
| OLD | NEW |