| 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_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 "ui/gl/gl_mock.h" | 8 #include "ui/gl/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 class Buffer; | |
| 15 class BufferManager; | |
| 16 class MockGLES2Decoder; | |
| 17 | 14 |
| 18 class TestHelper { | 15 class TestHelper { |
| 19 public: | 16 public: |
| 20 static const GLuint kServiceBlackTexture2dId = 701; | 17 static const GLuint kServiceBlackTexture2dId = 701; |
| 21 static const GLuint kServiceDefaultTexture2dId = 702; | 18 static const GLuint kServiceDefaultTexture2dId = 702; |
| 22 static const GLuint kServiceBlackTextureCubemapId = 703; | 19 static const GLuint kServiceBlackTextureCubemapId = 703; |
| 23 static const GLuint kServiceDefaultTextureCubemapId = 704; | 20 static const GLuint kServiceDefaultTextureCubemapId = 704; |
| 24 static const GLuint kServiceBlackExternalTextureId = 705; | 21 static const GLuint kServiceBlackExternalTextureId = 705; |
| 25 static const GLuint kServiceDefaultExternalTextureId = 706; | 22 static const GLuint kServiceDefaultExternalTextureId = 706; |
| 26 static const GLuint kServiceBlackRectangleTextureId = 707; | 23 static const GLuint kServiceBlackRectangleTextureId = 707; |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 82 ::gfx::MockGLInterface* gl, | 79 ::gfx::MockGLInterface* gl, |
| 83 AttribInfo* attribs, size_t num_attribs, | 80 AttribInfo* attribs, size_t num_attribs, |
| 84 UniformInfo* uniforms, size_t num_uniforms, | 81 UniformInfo* uniforms, size_t num_uniforms, |
| 85 GLuint service_id); | 82 GLuint service_id); |
| 86 | 83 |
| 87 static void SetupProgramSuccessExpectations(::gfx::MockGLInterface* gl, | 84 static void SetupProgramSuccessExpectations(::gfx::MockGLInterface* gl, |
| 88 AttribInfo* attribs, size_t num_attribs, | 85 AttribInfo* attribs, size_t num_attribs, |
| 89 UniformInfo* uniforms, size_t num_uniforms, | 86 UniformInfo* uniforms, size_t num_uniforms, |
| 90 GLuint service_id); | 87 GLuint service_id); |
| 91 | 88 |
| 92 static void DoBufferData( | |
| 93 ::gfx::MockGLInterface* gl, MockGLES2Decoder* decoder, | |
| 94 BufferManager* manager, Buffer* buffer, GLsizeiptr size, GLenum usage, | |
| 95 const GLvoid* data, GLenum error); | |
| 96 | |
| 97 private: | 89 private: |
| 98 static void SetupTextureInitializationExpectations( | 90 static void SetupTextureInitializationExpectations( |
| 99 ::gfx::MockGLInterface* gl, GLenum target); | 91 ::gfx::MockGLInterface* gl, GLenum target); |
| 100 static void SetupTextureDestructionExpectations( | 92 static void SetupTextureDestructionExpectations( |
| 101 ::gfx::MockGLInterface* gl, GLenum target); | 93 ::gfx::MockGLInterface* gl, GLenum target); |
| 102 }; | 94 }; |
| 103 | 95 |
| 104 } // namespace gles2 | 96 } // namespace gles2 |
| 105 } // namespace gpu | 97 } // namespace gpu |
| 106 | 98 |
| 107 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ | 99 #endif // GPU_COMMAND_BUFFER_SERVICE_TEST_HELPER_H_ |
| 108 | 100 |
| OLD | NEW |