| 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_GL_API_IMPLEMENTATION_H_ | 5 #ifndef UI_GL_GL_GL_API_IMPLEMENTATION_H_ |
| 6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_ | 6 #define UI_GL_GL_GL_API_IMPLEMENTATION_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 GLsizei width, | 96 GLsizei width, |
| 97 GLsizei height) override; | 97 GLsizei height) override; |
| 98 | 98 |
| 99 void glRenderbufferStorageMultisampleFn(GLenum target, | 99 void glRenderbufferStorageMultisampleFn(GLenum target, |
| 100 GLsizei samples, | 100 GLsizei samples, |
| 101 GLenum internalformat, | 101 GLenum internalformat, |
| 102 GLsizei width, | 102 GLsizei width, |
| 103 GLsizei height) override; | 103 GLsizei height) override; |
| 104 | 104 |
| 105 void glClearFn(GLbitfield mask) override; | 105 void glClearFn(GLbitfield mask) override; |
| 106 void glClearColorFn(GLclampf red, |
| 107 GLclampf green, |
| 108 GLclampf blue, |
| 109 GLclampf alpha) override; |
| 106 void glDrawArraysFn(GLenum mode, GLint first, GLsizei count) override; | 110 void glDrawArraysFn(GLenum mode, GLint first, GLsizei count) override; |
| 107 void glDrawElementsFn(GLenum mode, | 111 void glDrawElementsFn(GLenum mode, |
| 108 GLsizei count, | 112 GLsizei count, |
| 109 GLenum type, | 113 GLenum type, |
| 110 const void* indices) override; | 114 const void* indices) override; |
| 111 | 115 |
| 112 void glClearDepthFn(GLclampd depth) override; | 116 void glClearDepthFn(GLclampd depth) override; |
| 113 void glDepthRangeFn(GLclampd z_near, GLclampd z_far) override; | 117 void glDepthRangeFn(GLclampd z_near, GLclampd z_far) override; |
| 114 | 118 |
| 115 void InitializeFilteredExtensions(); | 119 void InitializeFilteredExtensions(); |
| 120 void setGLContext(GLContext* context); |
| 116 void set_version(std::unique_ptr<GLVersionInfo> version); | 121 void set_version(std::unique_ptr<GLVersionInfo> version); |
| 117 | 122 |
| 118 private: | 123 private: |
| 119 // Filtered GL_EXTENSIONS we return to glGetString(i) calls. | 124 // Filtered GL_EXTENSIONS we return to glGetString(i) calls. |
| 120 std::vector<std::string> disabled_exts_; | 125 std::vector<std::string> disabled_exts_; |
| 121 std::vector<std::string> filtered_exts_; | 126 std::vector<std::string> filtered_exts_; |
| 122 std::string filtered_exts_str_; | 127 std::string filtered_exts_str_; |
| 123 | 128 |
| 129 GLContext* gl_context_; |
| 124 std::unique_ptr<GLVersionInfo> version_; | 130 std::unique_ptr<GLVersionInfo> version_; |
| 125 | 131 |
| 126 #if DCHECK_IS_ON() | 132 #if DCHECK_IS_ON() |
| 127 bool filtered_exts_initialized_; | 133 bool filtered_exts_initialized_; |
| 128 #endif | 134 #endif |
| 129 }; | 135 }; |
| 130 | 136 |
| 131 // Inserts a TRACE for every GL call. | 137 // Inserts a TRACE for every GL call. |
| 132 class TraceGLApi : public GLApi { | 138 class TraceGLApi : public GLApi { |
| 133 public: | 139 public: |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 | 172 |
| 167 // Include the auto-generated part of this class. We split this because | 173 // Include the auto-generated part of this class. We split this because |
| 168 // it means we can easily edit the non-auto generated parts right here in | 174 // it means we can easily edit the non-auto generated parts right here in |
| 169 // this file instead of having to edit some template or the code generator. | 175 // this file instead of having to edit some template or the code generator. |
| 170 #include "gl_bindings_api_autogen_gl.h" | 176 #include "gl_bindings_api_autogen_gl.h" |
| 171 }; | 177 }; |
| 172 | 178 |
| 173 } // namespace gl | 179 } // namespace gl |
| 174 | 180 |
| 175 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ | 181 #endif // UI_GL_GL_GL_API_IMPLEMENTATION_H_ |
| OLD | NEW |