OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 { |
12 | 12 |
13 struct DisallowedFeatures; | 13 struct DisallowedFeatures; |
14 | 14 |
15 class TestHelper { | 15 class TestHelper { |
16 public: | 16 public: |
17 static const GLuint kServiceBlackTexture2dId = 701; | 17 static const GLuint kServiceBlackTexture2dId = 701; |
18 static const GLuint kServiceBlackTextureCubemapId = 702; | 18 static const GLuint kServiceDefaultTexture2dId = 702; |
19 static const GLuint kServiceDefaultTexture2dId = 703; | 19 static const GLuint kServiceBlackTextureCubemapId = 703; |
20 static const GLuint kServiceDefaultTextureCubemapId = 704; | 20 static const GLuint kServiceDefaultTextureCubemapId = 704; |
21 static const GLuint kServiceDefaultExternalTextureId = 705; | 21 static const GLuint kServiceBlackExternalTextureId = 705; |
22 static const GLuint kServiceBlackExternalTextureId = 706; | 22 static const GLuint kServiceDefaultExternalTextureId = 706; |
| 23 static const GLuint kServiceBlackRectangleTextureId = 707; |
| 24 static const GLuint kServiceDefaultRectangleTextureId = 708; |
23 | 25 |
24 static const GLint kMaxSamples = 4; | 26 static const GLint kMaxSamples = 4; |
25 static const GLint kMaxRenderbufferSize = 1024; | 27 static const GLint kMaxRenderbufferSize = 1024; |
26 static const GLint kMaxTextureSize = 2048; | 28 static const GLint kMaxTextureSize = 2048; |
27 static const GLint kMaxCubeMapTextureSize = 256; | 29 static const GLint kMaxCubeMapTextureSize = 256; |
28 static const GLint kNumVertexAttribs = 16; | 30 static const GLint kNumVertexAttribs = 16; |
29 static const GLint kNumTextureUnits = 8; | 31 static const GLint kNumTextureUnits = 8; |
30 static const GLint kMaxTextureImageUnits = 8; | 32 static const GLint kMaxTextureImageUnits = 8; |
31 static const GLint kMaxVertexTextureImageUnits = 2; | 33 static const GLint kMaxVertexTextureImageUnits = 2; |
32 static const GLint kMaxFragmentUniformVectors = 16; | 34 static const GLint kMaxFragmentUniformVectors = 16; |
33 static const GLint kMaxFragmentUniformComponents = | 35 static const GLint kMaxFragmentUniformComponents = |
34 kMaxFragmentUniformVectors * 4; | 36 kMaxFragmentUniformVectors * 4; |
35 static const GLint kMaxVaryingVectors = 8; | 37 static const GLint kMaxVaryingVectors = 8; |
36 static const GLint kMaxVaryingFloats = kMaxVaryingVectors * 4; | 38 static const GLint kMaxVaryingFloats = kMaxVaryingVectors * 4; |
37 static const GLint kMaxVertexUniformVectors = 128; | 39 static const GLint kMaxVertexUniformVectors = 128; |
38 static const GLint kMaxVertexUniformComponents = kMaxVertexUniformVectors * 4; | 40 static const GLint kMaxVertexUniformComponents = kMaxVertexUniformVectors * 4; |
39 | 41 |
40 static void SetupContextGroupInitExpectations( | 42 static void SetupContextGroupInitExpectations( |
41 ::gfx::MockGLInterface* gl, | 43 ::gfx::MockGLInterface* gl, |
42 const DisallowedFeatures& disallowed_features, | 44 const DisallowedFeatures& disallowed_features, |
43 const char* extensions); | 45 const char* extensions); |
44 static void SetupFeatureInfoInitExpectations( | 46 static void SetupFeatureInfoInitExpectations( |
45 ::gfx::MockGLInterface* gl, const char* extensions); | 47 ::gfx::MockGLInterface* gl, const char* extensions); |
46 static void SetupTextureManagerInitExpectations(::gfx::MockGLInterface* gl, | 48 static void SetupTextureManagerInitExpectations(::gfx::MockGLInterface* gl, |
47 const char* extensions); | 49 const char* extensions); |
| 50 private: |
| 51 static void SetupTextureInitializationExpectations(::gfx::MockGLInterface* gl, |
| 52 GLenum target); |
48 }; | 53 }; |
49 | 54 |
50 } // namespace gles2 | 55 } // namespace gles2 |
51 } // namespace gpu | 56 } // namespace gpu |
52 | 57 |
53 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 58 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
54 | 59 |
OLD | NEW |