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

Side by Side Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 1260253003: gpu: Add calling convention for win32 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: another merge Created 5 years, 4 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 | « no previous file | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('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 GLES2 command buffers.""" 6 """code generator for GLES2 command buffers."""
7 7
8 import itertools 8 import itertools
9 import os 9 import os
10 import os.path 10 import os.path
(...skipping 4726 matching lines...) Expand 10 before | Expand all | Expand 10 after
4737 def WriteGLES2ImplementationDeclaration(self, func, f): 4737 def WriteGLES2ImplementationDeclaration(self, func, f):
4738 """Writes the GLES2 Implemention declaration.""" 4738 """Writes the GLES2 Implemention declaration."""
4739 impl_decl = func.GetInfo('impl_decl') 4739 impl_decl = func.GetInfo('impl_decl')
4740 if impl_decl == None or impl_decl == True: 4740 if impl_decl == None or impl_decl == True:
4741 f.write("%s %s(%s) override;\n" % 4741 f.write("%s %s(%s) override;\n" %
4742 (func.return_type, func.original_name, 4742 (func.return_type, func.original_name,
4743 func.MakeTypedOriginalArgString(""))) 4743 func.MakeTypedOriginalArgString("")))
4744 f.write("\n") 4744 f.write("\n")
4745 4745
4746 def WriteGLES2CLibImplementation(self, func, f): 4746 def WriteGLES2CLibImplementation(self, func, f):
4747 f.write("%s GLES2%s(%s) {\n" % 4747 f.write("%s GL_APIENTRY GLES2%s(%s) {\n" %
4748 (func.return_type, func.name, 4748 (func.return_type, func.name,
4749 func.MakeTypedOriginalArgString(""))) 4749 func.MakeTypedOriginalArgString("")))
4750 result_string = "return " 4750 result_string = "return "
4751 if func.return_type == "void": 4751 if func.return_type == "void":
4752 result_string = "" 4752 result_string = ""
4753 f.write(" %sgles2::GetGLContext()->%s(%s);\n" % 4753 f.write(" %sgles2::GetGLContext()->%s(%s);\n" %
4754 (result_string, func.original_name, 4754 (result_string, func.original_name,
4755 func.MakeOriginalArgString(""))) 4755 func.MakeOriginalArgString("")))
4756 f.write("}\n") 4756 f.write("}\n")
4757 4757
(...skipping 6543 matching lines...) Expand 10 before | Expand all | Expand 10 after
11301 Format(gen.generated_cpp_filenames) 11301 Format(gen.generated_cpp_filenames)
11302 11302
11303 if gen.errors > 0: 11303 if gen.errors > 0:
11304 print "%d errors" % gen.errors 11304 print "%d errors" % gen.errors
11305 return 1 11305 return 1
11306 return 0 11306 return 0
11307 11307
11308 11308
11309 if __name__ == '__main__': 11309 if __name__ == '__main__':
11310 sys.exit(main(sys.argv[1:])) 11310 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_c_lib_autogen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698