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/gl_mock.h" | 8 #include "gpu/command_buffer/common/gl_mock.h" |
9 #include "gpu/command_buffer/common/gles2_cmd_format.h" | 9 #include "gpu/command_buffer/common/gles2_cmd_format.h" |
10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 10 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 GLint real_location; | 169 GLint real_location; |
170 }; | 170 }; |
171 | 171 |
172 void SetupShader( | 172 void SetupShader( |
173 AttribInfo* attribs, size_t num_attribs, | 173 AttribInfo* attribs, size_t num_attribs, |
174 UniformInfo* uniforms, size_t num_uniforms, | 174 UniformInfo* uniforms, size_t num_uniforms, |
175 GLuint client_id, GLuint service_id, | 175 GLuint client_id, GLuint service_id, |
176 GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, | 176 GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, |
177 GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); | 177 GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); |
178 | 178 |
| 179 void SetupExpectationsForClearingUniforms( |
| 180 UniformInfo* uniforms, size_t num_uniforms); |
| 181 |
179 // Setups up a shader for testing glUniform. | 182 // Setups up a shader for testing glUniform. |
180 void SetupShaderForUniform(); | 183 void SetupShaderForUniform(); |
181 void SetupDefaultProgram(); | 184 void SetupDefaultProgram(); |
182 void SetupCubemapProgram(); | 185 void SetupCubemapProgram(); |
183 void SetupTexture(); | 186 void SetupTexture(); |
184 | 187 |
185 // Note that the error is returned as GLint instead of GLenum. | 188 // Note that the error is returned as GLint instead of GLenum. |
186 // This is because there is a mismatch in the types of GLenum and | 189 // This is because there is a mismatch in the types of GLenum and |
187 // the error values GL_NO_ERROR, GL_INVALID_ENUM, etc. GLenum is | 190 // the error values GL_NO_ERROR, GL_INVALID_ENUM, etc. GLenum is |
188 // typedef'd as unsigned int while the error values are defined as | 191 // typedef'd as unsigned int while the error values are defined as |
(...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
519 protected: | 522 protected: |
520 virtual void SetUp() OVERRIDE; | 523 virtual void SetUp() OVERRIDE; |
521 virtual void TearDown() OVERRIDE; | 524 virtual void TearDown() OVERRIDE; |
522 | 525 |
523 }; | 526 }; |
524 | 527 |
525 } // namespace gles2 | 528 } // namespace gles2 |
526 } // namespace gpu | 529 } // namespace gpu |
527 | 530 |
528 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 531 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
OLD | NEW |