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_CONTEXT_H_ | 5 #ifndef UI_GL_GL_CONTEXT_H_ |
6 #define UI_GL_GL_CONTEXT_H_ | 6 #define UI_GL_GL_CONTEXT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 bool canceled_; | 150 bool canceled_; |
151 }; | 151 }; |
152 | 152 |
153 // Sets the GL api to the real hardware API (vs the VirtualAPI) | 153 // Sets the GL api to the real hardware API (vs the VirtualAPI) |
154 static void SetRealGLApi(); | 154 static void SetRealGLApi(); |
155 virtual void SetCurrent(GLSurface* surface); | 155 virtual void SetCurrent(GLSurface* surface); |
156 | 156 |
157 // Initialize function pointers to functions where the bound version depends | 157 // Initialize function pointers to functions where the bound version depends |
158 // on GL version or supported extensions. Should be called immediately after | 158 // on GL version or supported extensions. Should be called immediately after |
159 // this context is made current. | 159 // this context is made current. |
160 bool InitializeDynamicBindings(); | 160 void InitializeDynamicBindings(); |
161 | 161 |
162 // Returns the last real (non-virtual) GLContext made current. | 162 // Returns the last real (non-virtual) GLContext made current. |
163 static GLContext* GetRealCurrent(); | 163 static GLContext* GetRealCurrent(); |
164 | 164 |
165 virtual void OnSetSwapInterval(int interval) = 0; | 165 virtual void OnSetSwapInterval(int interval) = 0; |
166 | 166 |
167 private: | 167 private: |
168 friend class base::RefCounted<GLContext>; | 168 friend class base::RefCounted<GLContext>; |
169 | 169 |
170 // For GetRealCurrent. | 170 // For GetRealCurrent. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
202 // scoped_refptr containing the initialized GLContext or nullptr if | 202 // scoped_refptr containing the initialized GLContext or nullptr if |
203 // initialization fails. | 203 // initialization fails. |
204 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( | 204 GL_EXPORT scoped_refptr<GLContext> InitializeGLContext( |
205 scoped_refptr<GLContext> context, | 205 scoped_refptr<GLContext> context, |
206 GLSurface* compatible_surface, | 206 GLSurface* compatible_surface, |
207 GpuPreference gpu_preference); | 207 GpuPreference gpu_preference); |
208 | 208 |
209 } // namespace gl | 209 } // namespace gl |
210 | 210 |
211 #endif // UI_GL_GL_CONTEXT_H_ | 211 #endif // UI_GL_GL_CONTEXT_H_ |
OLD | NEW |