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 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
7 | 7 |
8 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 8 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
10 #include "gpu/command_buffer/service/buffer_manager.h" | 10 #include "gpu/command_buffer/service/buffer_manager.h" |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 typedef TestHelper::AttribInfo AttribInfo; | 186 typedef TestHelper::AttribInfo AttribInfo; |
187 typedef TestHelper::UniformInfo UniformInfo; | 187 typedef TestHelper::UniformInfo UniformInfo; |
188 | 188 |
189 void SetupShader( | 189 void SetupShader( |
190 AttribInfo* attribs, size_t num_attribs, | 190 AttribInfo* attribs, size_t num_attribs, |
191 UniformInfo* uniforms, size_t num_uniforms, | 191 UniformInfo* uniforms, size_t num_uniforms, |
192 GLuint client_id, GLuint service_id, | 192 GLuint client_id, GLuint service_id, |
193 GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, | 193 GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, |
194 GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); | 194 GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); |
195 | 195 |
196 void SetupExpectationsForClearingUniforms( | |
197 UniformInfo* uniforms, size_t num_uniforms) { | |
198 TestHelper::SetupExpectationsForClearingUniforms( | |
199 gl_.get(), uniforms, num_uniforms); | |
200 } | |
201 | |
202 void SetupInitCapabilitiesExpectations(); | 196 void SetupInitCapabilitiesExpectations(); |
203 void SetupInitStateExpectations(); | 197 void SetupInitStateExpectations(); |
204 void ExpectEnableDisable(GLenum cap, bool enable); | 198 void ExpectEnableDisable(GLenum cap, bool enable); |
205 | 199 |
206 // Setups up a shader for testing glUniform. | 200 // Setups up a shader for testing glUniform. |
207 void SetupShaderForUniform(GLenum uniform_type); | 201 void SetupShaderForUniform(GLenum uniform_type); |
208 void SetupDefaultProgram(); | 202 void SetupDefaultProgram(); |
209 void SetupCubemapProgram(); | 203 void SetupCubemapProgram(); |
210 void SetupSamplerExternalProgram(); | 204 void SetupSamplerExternalProgram(); |
211 void SetupTexture(); | 205 void SetupTexture(); |
(...skipping 339 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 protected: | 545 protected: |
552 virtual void SetUp() OVERRIDE; | 546 virtual void SetUp() OVERRIDE; |
553 virtual void TearDown() OVERRIDE; | 547 virtual void TearDown() OVERRIDE; |
554 | 548 |
555 }; | 549 }; |
556 | 550 |
557 } // namespace gles2 | 551 } // namespace gles2 |
558 } // namespace gpu | 552 } // namespace gpu |
559 | 553 |
560 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 554 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |