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

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

Issue 5567004: Proposed changes to Pepper 3D API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 10 years 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 | « no previous file | ppapi/c/dev/ppb_graphics_3d_dev.h » ('j') | ppapi/c/dev/ppb_graphics_3d_dev.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2006-2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """code generator for GLES2 command buffers.""" 7 """code generator for GLES2 command buffers."""
8 8
9 import os 9 import os
10 import os.path 10 import os.path
(...skipping 5186 matching lines...) Expand 10 before | Expand all | Expand 10 after
5197 def WritePepperGLES2Interface(self, filename): 5197 def WritePepperGLES2Interface(self, filename):
5198 """Writes the Pepper OpenGLES interface definition.""" 5198 """Writes the Pepper OpenGLES interface definition."""
5199 file = CHeaderWriter( 5199 file = CHeaderWriter(
5200 filename, 5200 filename,
5201 "// This interface is used to access common and lite profile OpenGL ES " 5201 "// This interface is used to access common and lite profile OpenGL ES "
5202 "2.0\n// functions.\n", 5202 "2.0\n// functions.\n",
5203 3) 5203 3)
5204 5204
5205 file.Write("#include \"ppapi/GLES2/khrplatform.h\"\n\n") 5205 file.Write("#include \"ppapi/GLES2/khrplatform.h\"\n\n")
5206 5206
5207 file.Write("#define PPB_OPENGLES_DEV_INTERFACE \"PPB_OpenGLES(Dev);2.0\"\n\n ") 5207 file.Write("#define PPB_GLES2_DEV_INTERFACE \"PPB_GLES(Dev);2.0\"\n\n")
5208 5208
5209 for (k, v) in _GL_TYPES.iteritems(): 5209 for (k, v) in _GL_TYPES.iteritems():
5210 file.Write("typedef %s %s;\n" % (v, k)) 5210 file.Write("typedef %s %s;\n" % (v, k))
5211 5211
5212 file.Write("\nstruct PPB_OpenGLES_Dev {\n") 5212 file.Write("\nstruct PPB_GLES2_Dev {\n")
5213 file.Write(" // TODO(alokp): Add context argument to all gl functions.\n")
neb 2010/12/03 19:27:21 I think that's an interesting idea. The way it wor
alokp 2010/12/03 19:39:51 Yes removing complexity is the goal. TLS should be
5213 for func in self.original_functions: 5214 for func in self.original_functions:
5214 if func.GetInfo('extension'): 5215 if func.GetInfo('extension') or func.name == 'SwapBuffers':
5215 continue 5216 continue
5216 file.Write(" %s (*%s)(%s);\n" % 5217 file.Write(" %s (*%s)(%s);\n" %
5217 (func.return_type, func.name, 5218 (func.return_type, func.name,
5218 func.MakeTypedOriginalArgString(""))) 5219 func.MakeTypedOriginalArgString("")))
5219 file.Write("};\n\n") 5220 file.Write("};\n\n")
5220 5221
5221 file.Close() 5222 file.Close()
5222 5223
5223 def WritePepperGLES2Implementation(self, filename): 5224 def WritePepperGLES2Implementation(self, filename):
5224 """Writes the Pepper OpenGLES interface implementation.""" 5225 """Writes the Pepper OpenGLES interface implementation."""
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
5322 5323
5323 if options.generate_docs: 5324 if options.generate_docs:
5324 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") 5325 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h")
5325 5326
5326 if gen.errors > 0: 5327 if gen.errors > 0:
5327 print "%d errors" % gen.errors 5328 print "%d errors" % gen.errors
5328 sys.exit(1) 5329 sys.exit(1)
5329 5330
5330 if __name__ == '__main__': 5331 if __name__ == '__main__':
5331 main(sys.argv[1:]) 5332 main(sys.argv[1:])
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_graphics_3d_dev.h » ('j') | ppapi/c/dev/ppb_graphics_3d_dev.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698