| 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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 | 199 |
| 200 #include "gl_bindings_autogen_gl.h" | 200 #include "gl_bindings_autogen_gl.h" |
| 201 #include "gl_bindings_autogen_osmesa.h" | 201 #include "gl_bindings_autogen_osmesa.h" |
| 202 | 202 |
| 203 #if defined(OS_WIN) | 203 #if defined(OS_WIN) |
| 204 #include "gl_bindings_autogen_egl.h" | 204 #include "gl_bindings_autogen_egl.h" |
| 205 #include "gl_bindings_autogen_wgl.h" | 205 #include "gl_bindings_autogen_wgl.h" |
| 206 #elif defined(USE_X11) | 206 #elif defined(USE_X11) |
| 207 #include "gl_bindings_autogen_egl.h" | 207 #include "gl_bindings_autogen_egl.h" |
| 208 #include "gl_bindings_autogen_glx.h" | 208 #include "gl_bindings_autogen_glx.h" |
| 209 #elif defined(USE_OZONE) |
| 210 #include "gl_bindings_autogen_egl.h" |
| 209 #elif defined(OS_ANDROID) | 211 #elif defined(OS_ANDROID) |
| 210 #include "gl_bindings_autogen_egl.h" | 212 #include "gl_bindings_autogen_egl.h" |
| 211 #endif | 213 #endif |
| 212 | 214 |
| 213 namespace gfx { | 215 namespace gfx { |
| 214 | 216 |
| 215 struct GL_EXPORT DriverGL { | 217 struct GL_EXPORT DriverGL { |
| 216 void Initialize(); | 218 void Initialize(); |
| 217 void InitializeExtensions(GLContext* context); | 219 void InitializeExtensions(GLContext* context); |
| 218 void InitializeDebugBindings(); | 220 void InitializeDebugBindings(); |
| (...skipping 29 matching lines...) Expand all Loading... |
| 248 void InitializeDebugBindings(); | 250 void InitializeDebugBindings(); |
| 249 void ClearBindings(); | 251 void ClearBindings(); |
| 250 void UpdateDebugExtensionBindings(); | 252 void UpdateDebugExtensionBindings(); |
| 251 | 253 |
| 252 ProcsWGL fn; | 254 ProcsWGL fn; |
| 253 ProcsWGL debug_fn; | 255 ProcsWGL debug_fn; |
| 254 ExtensionsWGL ext; | 256 ExtensionsWGL ext; |
| 255 }; | 257 }; |
| 256 #endif | 258 #endif |
| 257 | 259 |
| 258 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) | 260 #if defined(OS_WIN) || defined(USE_X11) || defined(OS_ANDROID) || defined(USE_OZ
ONE) |
| 259 struct GL_EXPORT DriverEGL { | 261 struct GL_EXPORT DriverEGL { |
| 260 void InitializeBindings(); | 262 void InitializeBindings(); |
| 261 void InitializeExtensionBindings(GLContext* context); | 263 void InitializeExtensionBindings(GLContext* context); |
| 262 void InitializeDebugBindings(); | 264 void InitializeDebugBindings(); |
| 263 void ClearBindings(); | 265 void ClearBindings(); |
| 264 void UpdateDebugExtensionBindings(); | 266 void UpdateDebugExtensionBindings(); |
| 265 | 267 |
| 266 ProcsEGL fn; | 268 ProcsEGL fn; |
| 267 ProcsEGL debug_fn; | 269 ProcsEGL debug_fn; |
| 268 ExtensionsEGL ext; | 270 ExtensionsEGL ext; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 295 GL_EXPORT extern DriverEGL g_driver_egl; | 297 GL_EXPORT extern DriverEGL g_driver_egl; |
| 296 GL_EXPORT extern DriverWGL g_driver_wgl; | 298 GL_EXPORT extern DriverWGL g_driver_wgl; |
| 297 | 299 |
| 298 #elif defined(USE_X11) | 300 #elif defined(USE_X11) |
| 299 | 301 |
| 300 GL_EXPORT extern EGLApi* g_current_egl_context; | 302 GL_EXPORT extern EGLApi* g_current_egl_context; |
| 301 GL_EXPORT extern GLXApi* g_current_glx_context; | 303 GL_EXPORT extern GLXApi* g_current_glx_context; |
| 302 GL_EXPORT extern DriverEGL g_driver_egl; | 304 GL_EXPORT extern DriverEGL g_driver_egl; |
| 303 GL_EXPORT extern DriverGLX g_driver_glx; | 305 GL_EXPORT extern DriverGLX g_driver_glx; |
| 304 | 306 |
| 307 #elif defined(USE_OZONE) |
| 308 |
| 309 GL_EXPORT extern EGLApi* g_current_egl_context; |
| 310 GL_EXPORT extern DriverEGL g_driver_egl; |
| 311 |
| 305 #elif defined(OS_ANDROID) | 312 #elif defined(OS_ANDROID) |
| 306 | 313 |
| 307 GL_EXPORT extern EGLApi* g_current_egl_context; | 314 GL_EXPORT extern EGLApi* g_current_egl_context; |
| 308 GL_EXPORT extern DriverEGL g_driver_egl; | 315 GL_EXPORT extern DriverEGL g_driver_egl; |
| 309 | 316 |
| 310 #endif | 317 #endif |
| 311 | 318 |
| 312 // Find an entry point to the mock GL implementation. | 319 // Find an entry point to the mock GL implementation. |
| 313 void* GL_BINDING_CALL GetMockGLProcAddress(const char* name); | 320 void* GL_BINDING_CALL GetMockGLProcAddress(const char* name); |
| 314 | 321 |
| 315 } // namespace gfx | 322 } // namespace gfx |
| 316 | 323 |
| 317 #endif // UI_GL_GL_BINDINGS_H_ | 324 #endif // UI_GL_GL_BINDINGS_H_ |
| OLD | NEW |