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

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

Issue 817653003: Update from https://crrev.com/309717 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 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
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1767 """// Copyright (c) 2012 The Chromium Authors. All rights reserved. 1767 """// Copyright (c) 2012 The Chromium Authors. All rights reserved.
1768 // Use of this source code is governed by a BSD-style license that can be 1768 // Use of this source code is governed by a BSD-style license that can be
1769 // found in the LICENSE file. 1769 // found in the LICENSE file.
1770 1770
1771 // This file is automatically generated. 1771 // This file is automatically generated.
1772 1772
1773 """ % {'name': set_name.upper()}) 1773 """ % {'name': set_name.upper()})
1774 1774
1775 # Write API declaration. 1775 # Write API declaration.
1776 for func in functions: 1776 for func in functions:
1777 file.write(' virtual %s %sFn(%s) override;\n' % 1777 file.write(' %s %sFn(%s) override;\n' %
1778 (func['return_type'], func['known_as'], func['arguments'])) 1778 (func['return_type'], func['known_as'], func['arguments']))
1779 1779
1780 file.write('\n') 1780 file.write('\n')
1781 1781
1782 1782
1783 def GenerateMockHeader(file, functions, set_name): 1783 def GenerateMockHeader(file, functions, set_name):
1784 """Generates gl_mock_autogen_x.h""" 1784 """Generates gl_mock_autogen_x.h"""
1785 1785
1786 # Write file header. 1786 # Write file header.
1787 file.write( 1787 file.write(
(...skipping 663 matching lines...) Expand 10 before | Expand all | Expand 10 after
2451 2451
2452 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'), 2452 source_file = open(os.path.join(directory, 'gl_bindings_autogen_mock.cc'),
2453 'wb') 2453 'wb')
2454 GenerateMockBindingsSource(source_file, GL_FUNCTIONS) 2454 GenerateMockBindingsSource(source_file, GL_FUNCTIONS)
2455 source_file.close() 2455 source_file.close()
2456 return 0 2456 return 0
2457 2457
2458 2458
2459 if __name__ == '__main__': 2459 if __name__ == '__main__':
2460 sys.exit(main(sys.argv[1:])) 2460 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « ui/gfx/render_text.cc ('k') | ui/gl/gl_gl_api_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698