OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CC_TEST_TEST_GLES2_INTERFACE_H_ | 5 #ifndef CC_TEST_TEST_GLES2_INTERFACE_H_ |
6 #define CC_TEST_TEST_GLES2_INTERFACE_H_ | 6 #define CC_TEST_TEST_GLES2_INTERFACE_H_ |
7 | 7 |
8 #include "gpu/command_buffer/client/gles2_interface_stub.h" | 8 #include "gpu/command_buffer/client/gles2_interface_stub.h" |
9 | 9 |
10 namespace cc { | 10 namespace cc { |
11 class TestWebGraphicsContext3D; | 11 class TestWebGraphicsContext3D; |
12 | 12 |
13 class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub { | 13 class TestGLES2Interface : public gpu::gles2::GLES2InterfaceStub { |
14 public: | 14 public: |
15 explicit TestGLES2Interface(TestWebGraphicsContext3D* test_context); | 15 TestGLES2Interface(); |
16 ~TestGLES2Interface() override; | 16 ~TestGLES2Interface() override; |
17 | 17 |
18 void GenTextures(GLsizei n, GLuint* textures) override; | 18 void GenTextures(GLsizei n, GLuint* textures) override; |
19 void GenBuffers(GLsizei n, GLuint* buffers) override; | 19 void GenBuffers(GLsizei n, GLuint* buffers) override; |
20 void GenFramebuffers(GLsizei n, GLuint* framebuffers) override; | 20 void GenFramebuffers(GLsizei n, GLuint* framebuffers) override; |
21 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override; | 21 void GenRenderbuffers(GLsizei n, GLuint* renderbuffers) override; |
22 void GenQueriesEXT(GLsizei n, GLuint* queries) override; | 22 void GenQueriesEXT(GLsizei n, GLuint* queries) override; |
23 | 23 |
24 void DeleteTextures(GLsizei n, const GLuint* textures) override; | 24 void DeleteTextures(GLsizei n, const GLuint* textures) override; |
25 void DeleteBuffers(GLsizei n, const GLuint* buffers) override; | 25 void DeleteBuffers(GLsizei n, const GLuint* buffers) override; |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
155 GLuint CreateAndConsumeTextureCHROMIUM(GLenum target, | 155 GLuint CreateAndConsumeTextureCHROMIUM(GLenum target, |
156 const GLbyte* mailbox) override; | 156 const GLbyte* mailbox) override; |
157 | 157 |
158 void ResizeCHROMIUM(GLuint width, | 158 void ResizeCHROMIUM(GLuint width, |
159 GLuint height, | 159 GLuint height, |
160 float device_scale, | 160 float device_scale, |
161 GLboolean has_alpha) override; | 161 GLboolean has_alpha) override; |
162 void LoseContextCHROMIUM(GLenum current, GLenum other) override; | 162 void LoseContextCHROMIUM(GLenum current, GLenum other) override; |
163 GLenum GetGraphicsResetStatusKHR() override; | 163 GLenum GetGraphicsResetStatusKHR() override; |
164 | 164 |
165 private: | 165 void set_test_context(TestWebGraphicsContext3D* context); |
166 TestWebGraphicsContext3D* test_context_; | 166 |
| 167 protected: |
| 168 virtual void InitializeTestContext(TestWebGraphicsContext3D* context) {} |
| 169 |
| 170 protected: |
| 171 TestWebGraphicsContext3D* test_context_ = nullptr; |
167 }; | 172 }; |
168 | 173 |
169 } // namespace cc | 174 } // namespace cc |
170 | 175 |
171 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_ | 176 #endif // CC_TEST_TEST_GLES2_INTERFACE_H_ |
OLD | NEW |