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 UI_GL_GL_INTERFACE_H_ |
| 6 #define UI_GL_GL_INTERFACE_H_ |
| 7 #pragma once |
| 8 |
5 // This file implements glue to a GL interface so we can mock it for unit | 9 // This file implements glue to a GL interface so we can mock it for unit |
6 // testing. It has to be Desktop GL, not GLES2 as it is used to test the service | 10 // testing. It has to be Desktop GL, not GLES2 as it is used to test the service |
7 // side code. | 11 // side code. |
8 | 12 |
9 #ifndef UI_GFX_GL_GL_INTERFACE_H_ | 13 #include "ui/gl/gl_bindings.h" |
10 #define UI_GFX_GL_GL_INTERFACE_H_ | |
11 #pragma once | |
12 | |
13 #include "ui/gfx/gl/gl_bindings.h" | |
14 | 14 |
15 namespace gfx { | 15 namespace gfx { |
16 | 16 |
17 class GL_EXPORT GLInterface { | 17 class GL_EXPORT GLInterface { |
18 public: | 18 public: |
19 virtual ~GLInterface() { | 19 virtual ~GLInterface() {} |
20 } | |
21 | 20 |
22 static void SetGLInterface(GLInterface* gl_interface); | 21 static void SetGLInterface(GLInterface* gl_interface); |
23 | 22 |
24 static GLInterface* GetGLInterface(); | 23 static GLInterface* GetGLInterface(); |
25 | 24 |
26 virtual void ActiveTexture(GLenum texture) = 0; | 25 virtual void ActiveTexture(GLenum texture) = 0; |
27 | 26 |
28 virtual void AttachShader(GLuint program, | 27 virtual void AttachShader(GLuint program, |
29 GLuint shader) = 0; | 28 GLuint shader) = 0; |
30 | 29 |
(...skipping 600 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 GLsizei primcount) = 0; | 630 GLsizei primcount) = 0; |
632 | 631 |
633 virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) = 0; | 632 virtual void VertexAttribDivisorANGLE(GLuint index, GLuint divisor) = 0; |
634 | 633 |
635 private: | 634 private: |
636 static GLInterface* interface_; | 635 static GLInterface* interface_; |
637 }; | 636 }; |
638 | 637 |
639 } // namespace gfx | 638 } // namespace gfx |
640 | 639 |
641 #endif // UI_GFX_GL_GL_INTERFACE_H_ | 640 #endif // UI_GL_GL_INTERFACE_H_ |
OLD | NEW |