OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 """code generator for GL/GLES extension wrangler.""" | 6 """code generator for GL/GLES extension wrangler.""" |
7 | 7 |
8 import optparse | 8 import optparse |
9 import os | 9 import os |
10 import collections | 10 import collections |
(...skipping 1806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1817 file.write(' MOCK_METHOD%d(%s, %s(%s));\n' % | 1817 file.write(' MOCK_METHOD%d(%s, %s(%s));\n' % |
1818 (arg_count, func['known_as'][2:], func['return_type'], args)) | 1818 (arg_count, func['known_as'][2:], func['return_type'], args)) |
1819 | 1819 |
1820 file.write('\n') | 1820 file.write('\n') |
1821 | 1821 |
1822 | 1822 |
1823 def GenerateSource(file, functions, set_name, used_extensions): | 1823 def GenerateSource(file, functions, set_name, used_extensions): |
1824 """Generates gl_bindings_autogen_x.cc""" | 1824 """Generates gl_bindings_autogen_x.cc""" |
1825 | 1825 |
1826 set_header_name = "ui/gl/gl_" + set_name.lower() + "_api_implementation.h" | 1826 set_header_name = "ui/gl/gl_" + set_name.lower() + "_api_implementation.h" |
1827 include_list = [ 'base/debug/trace_event.h', | 1827 include_list = [ 'base/trace_event/trace_event.h', |
1828 'ui/gl/gl_enums.h', | 1828 'ui/gl/gl_enums.h', |
1829 'ui/gl/gl_bindings.h', | 1829 'ui/gl/gl_bindings.h', |
1830 'ui/gl/gl_context.h', | 1830 'ui/gl/gl_context.h', |
1831 'ui/gl/gl_implementation.h', | 1831 'ui/gl/gl_implementation.h', |
1832 'ui/gl/gl_version_info.h', | 1832 'ui/gl/gl_version_info.h', |
1833 set_header_name ] | 1833 set_header_name ] |
1834 includes_string = "\n".join(["#include \"{0}\"".format(h) | 1834 includes_string = "\n".join(["#include \"{0}\"".format(h) |
1835 for h in sorted(include_list)]) | 1835 for h in sorted(include_list)]) |
1836 | 1836 |
1837 # Write file header. | 1837 # Write file header. |
(...skipping 667 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2505 'gl_enums_implementation_autogen.h'), | 2505 'gl_enums_implementation_autogen.h'), |
2506 'wb') | 2506 'wb') |
2507 GenerateEnumUtils(header_file, enum_header_filenames) | 2507 GenerateEnumUtils(header_file, enum_header_filenames) |
2508 header_file.close() | 2508 header_file.close() |
2509 ClangFormat(header_file.name) | 2509 ClangFormat(header_file.name) |
2510 return 0 | 2510 return 0 |
2511 | 2511 |
2512 | 2512 |
2513 if __name__ == '__main__': | 2513 if __name__ == '__main__': |
2514 sys.exit(main(sys.argv[1:])) | 2514 sys.exit(main(sys.argv[1:])) |
OLD | NEW |