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

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

Issue 11275120: Virtual GL (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
« no previous file with comments | « gpu/gpu.gyp ('k') | ui/gl/gl.gyp » ('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 os 8 import os
9 import collections 9 import collections
10 import re 10 import re
(...skipping 1216 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 """Generates gl_binding_api_autogen_x.h""" 1227 """Generates gl_binding_api_autogen_x.h"""
1228 1228
1229 # Write file header. 1229 # Write file header.
1230 file.write( 1230 file.write(
1231 """// Copyright (c) 2012 The Chromium Authors. All rights reserved. 1231 """// Copyright (c) 2012 The Chromium Authors. All rights reserved.
1232 // Use of this source code is governed by a BSD-style license that can be 1232 // Use of this source code is governed by a BSD-style license that can be
1233 // found in the LICENSE file. 1233 // found in the LICENSE file.
1234 1234
1235 // This file is automatically generated. 1235 // This file is automatically generated.
1236 1236
1237 #ifndef UI_GFX_GL_GL_BINDINGS_API_AUTOGEN_%(name)s_H_
1238 #define UI_GFX_GL_GL_BINDINGS_API_AUTOGEN_%(name)s_H_
1239
1240 """ % {'name': set_name.upper()}) 1237 """ % {'name': set_name.upper()})
1241 1238
1242 # Write API declaration. 1239 # Write API declaration.
1243 for func in functions: 1240 for func in functions:
1244 file.write(' virtual %s %sFn(%s) OVERRIDE;\n' % 1241 file.write(' virtual %s %sFn(%s) OVERRIDE;\n' %
1245 (func['return_type'], func['names'][0], func['arguments'])) 1242 (func['return_type'], func['names'][0], func['arguments']))
1246 1243
1247 file.write('\n') 1244 file.write('\n')
1248 file.write('#endif // UI_GFX_GL_GL_BINDINGS_API_AUTOGEN_%s_H_\n' %
1249 set_name.upper())
1250 1245
1251 1246
1252 def GenerateSource(file, functions, set_name, used_extension_functions): 1247 def GenerateSource(file, functions, set_name, used_extension_functions):
1253 """Generates gl_binding_autogen_x.cc""" 1248 """Generates gl_binding_autogen_x.cc"""
1254 1249
1255 # Write file header. 1250 # Write file header.
1256 file.write( 1251 file.write(
1257 """// Copyright (c) 2011 The Chromium Authors. All rights reserved. 1252 """// Copyright (c) 2011 The Chromium Authors. All rights reserved.
1258 // Use of this source code is governed by a BSD-style license that can be 1253 // Use of this source code is governed by a BSD-style license that can be
1259 // found in the LICENSE file. 1254 // found in the LICENSE file.
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
1658 source_file.close() 1653 source_file.close()
1659 1654
1660 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb') 1655 source_file = open(os.path.join(dir, 'gl_bindings_autogen_mock.cc'), 'wb')
1661 GenerateMockSource(source_file, GL_FUNCTIONS) 1656 GenerateMockSource(source_file, GL_FUNCTIONS)
1662 source_file.close() 1657 source_file.close()
1663 return 0 1658 return 0
1664 1659
1665 1660
1666 if __name__ == '__main__': 1661 if __name__ == '__main__':
1667 sys.exit(main(sys.argv[1:])) 1662 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « gpu/gpu.gyp ('k') | ui/gl/gl.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698