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

Side by Side Diff: ui/gfx/gl/generate_bindings.py

Issue 8423038: Move GL headers from gpu to third_party/khronos (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 1 month 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 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """code generator for GL/GLES extension wrangler.""" 7 """code generator for GL/GLES extension wrangler."""
8 8
9 import os 9 import os
10 import collections 10 import collections
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 'Display* dpy, GLXDrawable drawable, int interval'], 460 'Display* dpy, GLXDrawable drawable, int interval'],
461 ['GLXFBConfig', ['glXGetFBConfigFromVisualSGIX'], 461 ['GLXFBConfig', ['glXGetFBConfigFromVisualSGIX'],
462 'Display* dpy, XVisualInfo* visualInfo'], 462 'Display* dpy, XVisualInfo* visualInfo'],
463 ['GLXContext', ['glXCreateContextAttribsARB'], 463 ['GLXContext', ['glXCreateContextAttribsARB'],
464 'Display* dpy, GLXFBConfig config, GLXContext share_context, int direct, ' 464 'Display* dpy, GLXFBConfig config, GLXContext share_context, int direct, '
465 'const int* attrib_list'], 465 'const int* attrib_list'],
466 ] 466 ]
467 467
468 FUNCTION_SETS = [ 468 FUNCTION_SETS = [
469 [GL_FUNCTIONS, 'gl', ['../../../third_party/mesa/MesaLib/include/GL/glext.h', 469 [GL_FUNCTIONS, 'gl', ['../../../third_party/mesa/MesaLib/include/GL/glext.h',
470 '../../../gpu/GLES2/gl2ext.h']], 470 '../../../third_party/khronos/GLES2/gl2ext.h']],
471 [OSMESA_FUNCTIONS, 'osmesa', []], 471 [OSMESA_FUNCTIONS, 'osmesa', []],
472 [EGL_FUNCTIONS, 'egl', ['../../../gpu/EGL/eglext.h']], 472 [EGL_FUNCTIONS, 'egl', ['../../../third_party/khronos/EGL/eglext.h']],
473 [WGL_FUNCTIONS, 'wgl', [ 473 [WGL_FUNCTIONS, 'wgl', [
474 '../../../third_party/mesa/MesaLib/include/GL/wglext.h']], 474 '../../../third_party/mesa/MesaLib/include/GL/wglext.h']],
475 [GLX_FUNCTIONS, 'glx', [ 475 [GLX_FUNCTIONS, 'glx', [
476 '../../../third_party/mesa/MesaLib/include/GL/glxext.h']], 476 '../../../third_party/mesa/MesaLib/include/GL/glxext.h']],
477 ] 477 ]
478 478
479 def GenerateHeader(file, functions, set_name): 479 def GenerateHeader(file, functions, set_name):
480 """Generates gl_binding_autogen_x.h""" 480 """Generates gl_binding_autogen_x.h"""
481 481
482 # Write file header. 482 # Write file header.
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after
848 GenerateSource(source_file, functions, set_name, used_extension_functions) 848 GenerateSource(source_file, functions, set_name, used_extension_functions)
849 source_file.close() 849 source_file.close()
850 850
851 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') 851 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb')
852 GenerateMockSource(source_file, GL_FUNCTIONS) 852 GenerateMockSource(source_file, GL_FUNCTIONS)
853 source_file.close() 853 source_file.close()
854 854
855 855
856 if __name__ == '__main__': 856 if __name__ == '__main__':
857 main(sys.argv[1:]) 857 main(sys.argv[1:])
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698