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 <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
714 .Times(1) | 714 .Times(1) |
715 .RetiresOnSaturation(); | 715 .RetiresOnSaturation(); |
716 #if DCHECK_IS_ON() | 716 #if DCHECK_IS_ON() |
717 EXPECT_CALL(*gl, GetError()) | 717 EXPECT_CALL(*gl, GetError()) |
718 .WillOnce(Return(GL_NO_ERROR)) | 718 .WillOnce(Return(GL_NO_ERROR)) |
719 .RetiresOnSaturation(); | 719 .RetiresOnSaturation(); |
720 #endif | 720 #endif |
721 } | 721 } |
722 } | 722 } |
723 | 723 |
| 724 void TestHelper::SetupFetureInfoEnableES3ValidatorsExpectations( |
| 725 ::gl::MockGLInterface* gl) { |
| 726 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_COLOR_ATTACHMENTS, _)) |
| 727 .WillOnce(SetArgumentPointee<1>(8)) |
| 728 .RetiresOnSaturation(); |
| 729 EXPECT_CALL(*gl, GetIntegerv(GL_MAX_DRAW_BUFFERS, _)) |
| 730 .WillOnce(SetArgumentPointee<1>(8)) |
| 731 .RetiresOnSaturation(); |
| 732 } |
| 733 |
724 void TestHelper::SetupExpectationsForClearingUniforms(::gl::MockGLInterface* gl, | 734 void TestHelper::SetupExpectationsForClearingUniforms(::gl::MockGLInterface* gl, |
725 UniformInfo* uniforms, | 735 UniformInfo* uniforms, |
726 size_t num_uniforms) { | 736 size_t num_uniforms) { |
727 for (size_t ii = 0; ii < num_uniforms; ++ii) { | 737 for (size_t ii = 0; ii < num_uniforms; ++ii) { |
728 const UniformInfo& info = uniforms[ii]; | 738 const UniformInfo& info = uniforms[ii]; |
729 switch (info.type) { | 739 switch (info.type) { |
730 case GL_FLOAT: | 740 case GL_FLOAT: |
731 EXPECT_CALL(*gl, Uniform1fv(info.real_location, info.size, _)) | 741 EXPECT_CALL(*gl, Uniform1fv(info.real_location, info.size, _)) |
732 .Times(1) | 742 .Times(1) |
733 .RetiresOnSaturation(); | 743 .RetiresOnSaturation(); |
(...skipping 468 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1202 GLenum precision, | 1212 GLenum precision, |
1203 bool static_use, | 1213 bool static_use, |
1204 const std::string& name) { | 1214 const std::string& name) { |
1205 return ConstructShaderVariable<sh::OutputVariable>( | 1215 return ConstructShaderVariable<sh::OutputVariable>( |
1206 type, array_size, precision, static_use, name); | 1216 type, array_size, precision, static_use, name); |
1207 } | 1217 } |
1208 | 1218 |
1209 } // namespace gles2 | 1219 } // namespace gles2 |
1210 } // namespace gpu | 1220 } // namespace gpu |
1211 | 1221 |
OLD | NEW |