OLD | NEW |
1 // Copyright (c) 2011 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_TEST_HELPER_H_ | 5 #ifndef GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
6 #define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 6 #define GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
7 | 7 |
8 #include "gpu/command_buffer/common/gl_mock.h" | 8 #include "gpu/command_buffer/common/gl_mock.h" |
9 | 9 |
10 namespace gpu { | 10 namespace gpu { |
11 namespace gles2 { | 11 namespace gles2 { |
(...skipping 20 matching lines...) Expand all Loading... |
32 static const GLint kMaxTextureImageUnits = 8; | 32 static const GLint kMaxTextureImageUnits = 8; |
33 static const GLint kMaxVertexTextureImageUnits = 2; | 33 static const GLint kMaxVertexTextureImageUnits = 2; |
34 static const GLint kMaxFragmentUniformVectors = 16; | 34 static const GLint kMaxFragmentUniformVectors = 16; |
35 static const GLint kMaxFragmentUniformComponents = | 35 static const GLint kMaxFragmentUniformComponents = |
36 kMaxFragmentUniformVectors * 4; | 36 kMaxFragmentUniformVectors * 4; |
37 static const GLint kMaxVaryingVectors = 8; | 37 static const GLint kMaxVaryingVectors = 8; |
38 static const GLint kMaxVaryingFloats = kMaxVaryingVectors * 4; | 38 static const GLint kMaxVaryingFloats = kMaxVaryingVectors * 4; |
39 static const GLint kMaxVertexUniformVectors = 128; | 39 static const GLint kMaxVertexUniformVectors = 128; |
40 static const GLint kMaxVertexUniformComponents = kMaxVertexUniformVectors * 4; | 40 static const GLint kMaxVertexUniformComponents = kMaxVertexUniformVectors * 4; |
41 | 41 |
| 42 struct AttribInfo { |
| 43 const char* name; |
| 44 GLint size; |
| 45 GLenum type; |
| 46 GLint location; |
| 47 }; |
| 48 |
| 49 struct UniformInfo { |
| 50 const char* name; |
| 51 GLint size; |
| 52 GLenum type; |
| 53 GLint fake_location; |
| 54 GLint real_location; |
| 55 const char* good_name; |
| 56 }; |
| 57 |
42 static void SetupContextGroupInitExpectations( | 58 static void SetupContextGroupInitExpectations( |
43 ::gfx::MockGLInterface* gl, | 59 ::gfx::MockGLInterface* gl, |
44 const DisallowedFeatures& disallowed_features, | 60 const DisallowedFeatures& disallowed_features, |
45 const char* extensions); | 61 const char* extensions); |
46 static void SetupFeatureInfoInitExpectations( | 62 static void SetupFeatureInfoInitExpectations( |
47 ::gfx::MockGLInterface* gl, const char* extensions); | 63 ::gfx::MockGLInterface* gl, const char* extensions); |
48 static void SetupTextureManagerInitExpectations(::gfx::MockGLInterface* gl, | 64 static void SetupTextureManagerInitExpectations(::gfx::MockGLInterface* gl, |
49 const char* extensions); | 65 const char* extensions); |
| 66 |
| 67 static void SetupExpectationsForClearingUniforms( |
| 68 ::gfx::MockGLInterface* gl, UniformInfo* uniforms, size_t num_uniforms); |
| 69 |
| 70 static void SetupShader( |
| 71 ::gfx::MockGLInterface* gl, |
| 72 AttribInfo* attribs, size_t num_attribs, |
| 73 UniformInfo* uniforms, size_t num_uniforms, |
| 74 GLuint service_id); |
| 75 |
50 private: | 76 private: |
51 static void SetupTextureInitializationExpectations(::gfx::MockGLInterface* gl, | 77 static void SetupTextureInitializationExpectations(::gfx::MockGLInterface* gl, |
52 GLenum target); | 78 GLenum target); |
53 }; | 79 }; |
54 | 80 |
55 } // namespace gles2 | 81 } // namespace gles2 |
56 } // namespace gpu | 82 } // namespace gpu |
57 | 83 |
58 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 84 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
59 | 85 |
OLD | NEW |