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_BINDINGS_H_ | 5 #ifndef UI_GL_GL_BINDINGS_H_ |
6 #define UI_GL_GL_BINDINGS_H_ | 6 #define UI_GL_GL_BINDINGS_H_ |
7 | 7 |
8 // Includes the platform independent and platform dependent GL headers. | 8 // Includes the platform independent and platform dependent GL headers. |
9 // Only include this in cc files. It pulls in system headers, including | 9 // Only include this in cc files. It pulls in system headers, including |
10 // the X11 headers on linux, which define all kinds of macros that are | 10 // the X11 headers on linux, which define all kinds of macros that are |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 #include "gl_bindings_autogen_glx.h" | 218 #include "gl_bindings_autogen_glx.h" |
219 #elif defined(USE_OZONE) | 219 #elif defined(USE_OZONE) |
220 #include "gl_bindings_autogen_egl.h" | 220 #include "gl_bindings_autogen_egl.h" |
221 #elif defined(OS_ANDROID) | 221 #elif defined(OS_ANDROID) |
222 #include "gl_bindings_autogen_egl.h" | 222 #include "gl_bindings_autogen_egl.h" |
223 #endif | 223 #endif |
224 | 224 |
225 namespace gfx { | 225 namespace gfx { |
226 | 226 |
227 struct GL_EXPORT DriverGL { | 227 struct GL_EXPORT DriverGL { |
228 void Initialize(); | 228 void InitializeStaticBindings(); |
229 void InitializeExtensions(GLContext* context); | 229 void InitializeCustomDynamicBindings(GLContext* context); |
230 void InitializeDebugBindings(); | 230 void InitializeDebugBindings(); |
231 void InitializeNullDrawBindings(); | 231 void InitializeNullDrawBindings(); |
232 void ClearBindings(); | 232 void ClearBindings(); |
233 void UpdateDebugExtensionBindings(); | |
234 | 233 |
235 ProcsGL fn; | 234 ProcsGL fn; |
236 ProcsGL orig_fn; | 235 ProcsGL orig_fn; |
237 ProcsGL debug_fn; | 236 ProcsGL debug_fn; |
238 ExtensionsGL ext; | 237 ExtensionsGL ext; |
239 | 238 |
240 private: | 239 private: |
241 void InitializeBindings(); | 240 void InitializeDynamicBindings(GLContext* context); |
242 void InitializeExtensionBindings(GLContext* context); | |
243 }; | 241 }; |
244 | 242 |
245 struct GL_EXPORT DriverOSMESA { | 243 struct GL_EXPORT DriverOSMESA { |
246 void InitializeBindings(); | 244 void InitializeStaticBindings(); |
247 void InitializeExtensionBindings(GLContext* context); | 245 void InitializeDynamicBindings(GLContext* context); |
248 void InitializeDebugBindings(); | 246 void InitializeDebugBindings(); |
249 void ClearBindings(); | 247 void ClearBindings(); |
250 void UpdateDebugExtensionBindings(); | |
251 | 248 |
252 ProcsOSMESA fn; | 249 ProcsOSMESA fn; |
253 ProcsOSMESA debug_fn; | 250 ProcsOSMESA debug_fn; |
254 ExtensionsOSMESA ext; | 251 ExtensionsOSMESA ext; |
255 }; | 252 }; |
256 | 253 |
257 #if defined(OS_WIN) | 254 #if defined(OS_WIN) |
258 struct GL_EXPORT DriverWGL { | 255 struct GL_EXPORT DriverWGL { |
259 void InitializeBindings(); | 256 void InitializeStaticBindings(); |
260 void InitializeExtensionBindings(GLContext* context); | 257 void InitializeDynamicBindings(GLContext* context); |
261 void InitializeDebugBindings(); | 258 void InitializeDebugBindings(); |
262 void ClearBindings(); | 259 void ClearBindings(); |
263 void UpdateDebugExtensionBindings(); | |
264 | 260 |
265 ProcsWGL fn; | 261 ProcsWGL fn; |
266 ProcsWGL debug_fn; | 262 ProcsWGL debug_fn; |
267 ExtensionsWGL ext; | 263 ExtensionsWGL ext; |
268 }; | 264 }; |
269 #endif | 265 #endif |
270 | 266 |
271 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZ
ONE) | 267 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZ
ONE) |
272 struct GL_EXPORT DriverEGL { | 268 struct GL_EXPORT DriverEGL { |
273 void InitializeBindings(); | 269 void InitializeStaticBindings(); |
274 void InitializeExtensionBindings(GLContext* context); | 270 void InitializeDynamicBindings(GLContext* context); |
275 void InitializeDebugBindings(); | 271 void InitializeDebugBindings(); |
276 void ClearBindings(); | 272 void ClearBindings(); |
277 void UpdateDebugExtensionBindings(); | |
278 | 273 |
279 ProcsEGL fn; | 274 ProcsEGL fn; |
280 ProcsEGL debug_fn; | 275 ProcsEGL debug_fn; |
281 ExtensionsEGL ext; | 276 ExtensionsEGL ext; |
282 }; | 277 }; |
283 #endif | 278 #endif |
284 | 279 |
285 #if defined(USE_X11) | 280 #if defined(USE_X11) |
286 struct GL_EXPORT DriverGLX { | 281 struct GL_EXPORT DriverGLX { |
287 void InitializeBindings(); | 282 void InitializeStaticBindings(); |
288 void InitializeExtensionBindings(GLContext* context); | 283 void InitializeDynamicBindings(GLContext* context); |
289 void InitializeDebugBindings(); | 284 void InitializeDebugBindings(); |
290 void ClearBindings(); | 285 void ClearBindings(); |
291 void UpdateDebugExtensionBindings(); | |
292 | 286 |
293 ProcsGLX fn; | 287 ProcsGLX fn; |
294 ProcsGLX debug_fn; | 288 ProcsGLX debug_fn; |
295 ExtensionsGLX ext; | 289 ExtensionsGLX ext; |
296 }; | 290 }; |
297 #endif | 291 #endif |
298 | 292 |
299 // This #define is here to support autogenerated code. | 293 // This #define is here to support autogenerated code. |
300 #define g_current_gl_context g_current_gl_context_tls->Get() | 294 #define g_current_gl_context g_current_gl_context_tls->Get() |
301 GL_EXPORT extern base::ThreadLocalPointer<GLApi>* g_current_gl_context_tls; | 295 GL_EXPORT extern base::ThreadLocalPointer<GLApi>* g_current_gl_context_tls; |
(...skipping 27 matching lines...) Expand all Loading... |
329 GL_EXPORT extern DriverEGL g_driver_egl; | 323 GL_EXPORT extern DriverEGL g_driver_egl; |
330 | 324 |
331 #endif | 325 #endif |
332 | 326 |
333 // Find an entry point to the mock GL implementation. | 327 // Find an entry point to the mock GL implementation. |
334 void* GL_BINDING_CALL GetMockGLProcAddress(const char* name); | 328 void* GL_BINDING_CALL GetMockGLProcAddress(const char* name); |
335 | 329 |
336 } // namespace gfx | 330 } // namespace gfx |
337 | 331 |
338 #endif // UI_GL_GL_BINDINGS_H_ | 332 #endif // UI_GL_GL_BINDINGS_H_ |
OLD | NEW |