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: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 6373013: Fix for jankiness in some accelerated 2D canvas demos: If there is already a... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_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/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 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
1575 'data_type': 'GLfloat', 1575 'data_type': 'GLfloat',
1576 'count': 4, 1576 'count': 4,
1577 'decoder_func': 'DoVertexAttrib4fv', 1577 'decoder_func': 'DoVertexAttrib4fv',
1578 }, 1578 },
1579 'VertexAttribPointer': { 1579 'VertexAttribPointer': {
1580 'type': 'Manual', 1580 'type': 'Manual',
1581 'cmd_args': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, ' 1581 'cmd_args': 'GLuint indx, GLint size, GLenum type, GLboolean normalized, '
1582 'GLsizei stride, GLuint offset', 1582 'GLsizei stride, GLuint offset',
1583 }, 1583 },
1584 'CopyTextureToParentTextureCHROMIUM': { 1584 'CopyTextureToParentTextureCHROMIUM': {
1585 'impl_func': False,
1585 'decoder_func': 'DoCopyTextureToParentTextureCHROMIUM', 1586 'decoder_func': 'DoCopyTextureToParentTextureCHROMIUM',
1586 'unit_test': False, 1587 'unit_test': False,
1587 'extension': True, 1588 'extension': True,
1588 'chromium': True, 1589 'chromium': True,
1589 }, 1590 },
1590 'ResizeCHROMIUM': { 1591 'ResizeCHROMIUM': {
1591 'decoder_func': 'DoResizeCHROMIUM', 1592 'decoder_func': 'DoResizeCHROMIUM',
1592 'unit_test': False, 1593 'unit_test': False,
1593 'extension': True, 1594 'extension': True,
1594 'chromium': True, 1595 'chromium': True,
(...skipping 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after
5317 if not func.IsCoreGLFunction(): 5318 if not func.IsCoreGLFunction():
5318 continue 5319 continue
5319 5320
5320 original_arg = func.MakeTypedOriginalArgString("") 5321 original_arg = func.MakeTypedOriginalArgString("")
5321 context_arg = "PP_Resource context_id" 5322 context_arg = "PP_Resource context_id"
5322 if len(original_arg): 5323 if len(original_arg):
5323 arg = context_arg + ", " + original_arg 5324 arg = context_arg + ", " + original_arg
5324 else: 5325 else:
5325 arg = context_arg 5326 arg = context_arg
5326 file.Write("%s %s(%s) {\n" % (func.return_type, func.name, arg)) 5327 file.Write("%s %s(%s) {\n" % (func.return_type, func.name, arg))
5327 5328
5328 file.Write(""" scoped_refptr<PPB_Context3D_Impl> context = 5329 file.Write(""" scoped_refptr<PPB_Context3D_Impl> context =
5329 Resource::GetAs<PPB_Context3D_Impl>(context_id); 5330 Resource::GetAs<PPB_Context3D_Impl>(context_id);
5330 """) 5331 """)
5331 5332
5332 return_str = "" if func.return_type == "void" else "return " 5333 return_str = "" if func.return_type == "void" else "return "
5333 file.Write(" %scontext->gles2_impl()->%s(%s);\n" % 5334 file.Write(" %scontext->gles2_impl()->%s(%s);\n" %
5334 (return_str, func.original_name, 5335 (return_str, func.original_name,
5335 func.MakeOriginalArgString(""))) 5336 func.MakeOriginalArgString("")))
5336 file.Write("}\n\n") 5337 file.Write("}\n\n")
5337 5338
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
5438 5439
5439 if options.generate_docs: 5440 if options.generate_docs:
5440 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") 5441 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h")
5441 5442
5442 if gen.errors > 0: 5443 if gen.errors > 0:
5443 print "%d errors" % gen.errors 5444 print "%d errors" % gen.errors
5444 sys.exit(1) 5445 sys.exit(1)
5445 5446
5446 if __name__ == '__main__': 5447 if __name__ == '__main__':
5447 main(sys.argv[1:]) 5448 main(sys.argv[1:])
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698