| 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 GLuint client_id, GLuint service_id, | 171 GLuint client_id, GLuint service_id, |
| 172 GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, | 172 GLuint vertex_shader_client_id, GLuint vertex_shader_service_id, |
| 173 GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); | 173 GLuint fragment_shader_client_id, GLuint fragment_shader_service_id); |
| 174 | 174 |
| 175 void SetupExpectationsForClearingUniforms( | 175 void SetupExpectationsForClearingUniforms( |
| 176 UniformInfo* uniforms, size_t num_uniforms) { | 176 UniformInfo* uniforms, size_t num_uniforms) { |
| 177 TestHelper::SetupExpectationsForClearingUniforms( | 177 TestHelper::SetupExpectationsForClearingUniforms( |
| 178 gl_.get(), uniforms, num_uniforms); | 178 gl_.get(), uniforms, num_uniforms); |
| 179 } | 179 } |
| 180 | 180 |
| 181 void SetupInitCapabilitiesExpectations(); |
| 182 void SetupInitStateExpectations(); |
| 183 void ExpectEnableDisable(GLenum cap, bool enable); |
| 184 |
| 181 // Setups up a shader for testing glUniform. | 185 // Setups up a shader for testing glUniform. |
| 182 void SetupShaderForUniform(); | 186 void SetupShaderForUniform(); |
| 183 void SetupDefaultProgram(); | 187 void SetupDefaultProgram(); |
| 184 void SetupCubemapProgram(); | 188 void SetupCubemapProgram(); |
| 185 void SetupTexture(); | 189 void SetupTexture(); |
| 186 | 190 |
| 187 // Note that the error is returned as GLint instead of GLenum. | 191 // Note that the error is returned as GLint instead of GLenum. |
| 188 // This is because there is a mismatch in the types of GLenum and | 192 // This is because there is a mismatch in the types of GLenum and |
| 189 // the error values GL_NO_ERROR, GL_INVALID_ENUM, etc. GLenum is | 193 // the error values GL_NO_ERROR, GL_INVALID_ENUM, etc. GLenum is |
| 190 // typedef'd as unsigned int while the error values are defined as | 194 // typedef'd as unsigned int while the error values are defined as |
| (...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 527 protected: | 531 protected: |
| 528 virtual void SetUp() OVERRIDE; | 532 virtual void SetUp() OVERRIDE; |
| 529 virtual void TearDown() OVERRIDE; | 533 virtual void TearDown() OVERRIDE; |
| 530 | 534 |
| 531 }; | 535 }; |
| 532 | 536 |
| 533 } // namespace gles2 | 537 } // namespace gles2 |
| 534 } // namespace gpu | 538 } // namespace gpu |
| 535 | 539 |
| 536 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ | 540 #endif // GPU_COMMAND_BUFFER_SERVICE_GLES2_CMD_DECODER_UNITTEST_BASE_H_ |
| OLD | NEW |