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

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: 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
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 4706 matching lines...) Expand 10 before | Expand all | Expand 10 after
4717 def WriteGLES2ImplementationDeclaration(self, func, file): 4717 def WriteGLES2ImplementationDeclaration(self, func, file):
4718 """Writes the GLES2 Implemention declaration.""" 4718 """Writes the GLES2 Implemention declaration."""
4719 impl_decl = func.GetInfo('impl_decl') 4719 impl_decl = func.GetInfo('impl_decl')
4720 if impl_decl == None or impl_decl == True: 4720 if impl_decl == None or impl_decl == True:
4721 file.Write("%s %s(%s) override;\n" % 4721 file.Write("%s %s(%s) override;\n" %
4722 (func.return_type, func.original_name, 4722 (func.return_type, func.original_name,
4723 func.MakeTypedOriginalArgString(""))) 4723 func.MakeTypedOriginalArgString("")))
4724 file.Write("\n") 4724 file.Write("\n")
4725 4725
4726 def WriteGLES2CLibImplementation(self, func, file): 4726 def WriteGLES2CLibImplementation(self, func, file):
4727 file.Write("%s GLES2%s(%s) {\n" % 4727 file.Write("%s GL_APIENTRY GLES2%s(%s) {\n" %
4728 (func.return_type, func.name, 4728 (func.return_type, func.name,
4729 func.MakeTypedOriginalArgString(""))) 4729 func.MakeTypedOriginalArgString("")))
4730 result_string = "return " 4730 result_string = "return "
4731 if func.return_type == "void": 4731 if func.return_type == "void":
4732 result_string = "" 4732 result_string = ""
4733 file.Write(" %sgles2::GetGLContext()->%s(%s);\n" % 4733 file.Write(" %sgles2::GetGLContext()->%s(%s);\n" %
4734 (result_string, func.original_name, 4734 (result_string, func.original_name,
4735 func.MakeOriginalArgString(""))) 4735 func.MakeOriginalArgString("")))
4736 file.Write("}\n") 4736 file.Write("}\n")
4737 4737
(...skipping 6543 matching lines...) Expand 10 before | Expand all | Expand 10 after
11281 Format(gen.generated_cpp_filenames) 11281 Format(gen.generated_cpp_filenames)
11282 11282
11283 if gen.errors > 0: 11283 if gen.errors > 0:
11284 print "%d errors" % gen.errors 11284 print "%d errors" % gen.errors
11285 return 1 11285 return 1
11286 return 0 11286 return 0
11287 11287
11288 11288
11289 if __name__ == '__main__': 11289 if __name__ == '__main__':
11290 sys.exit(main(sys.argv[1:])) 11290 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') | gpu/gles2_conform_support/egl/egl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698