Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(27)

Side by Side Diff: ui/gl/gl_bindings.h

Issue 135213003: Ensure GL initialization only happens once, and provide common init path (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: initgl: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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 DriverGL();
229
228 void InitializeStaticBindings(); 230 void InitializeStaticBindings();
229 void InitializeCustomDynamicBindings(GLContext* context); 231 void InitializeCustomDynamicBindings(GLContext* context);
230 void InitializeDebugBindings(); 232 void InitializeDebugBindings();
231 void InitializeNullDrawBindings(); 233 void InitializeNullDrawBindings();
232 void ClearBindings(); 234 void ClearBindings();
233 235
234 ProcsGL fn; 236 ProcsGL fn;
235 ProcsGL orig_fn; 237 ProcsGL orig_fn;
236 ProcsGL debug_fn; 238 ProcsGL debug_fn;
237 ExtensionsGL ext; 239 ExtensionsGL ext;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 GL_EXPORT extern DriverEGL g_driver_egl; 325 GL_EXPORT extern DriverEGL g_driver_egl;
324 326
325 #endif 327 #endif
326 328
327 // Find an entry point to the mock GL implementation. 329 // Find an entry point to the mock GL implementation.
328 void* GL_BINDING_CALL GetMockGLProcAddress(const char* name); 330 void* GL_BINDING_CALL GetMockGLProcAddress(const char* name);
329 331
330 } // namespace gfx 332 } // namespace gfx
331 333
332 #endif // UI_GL_GL_BINDINGS_H_ 334 #endif // UI_GL_GL_BINDINGS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698