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

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

Issue 7358006: Cache OpenGL program info on the client side of the command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix warnings Created 9 years, 5 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
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # 2 #
3 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 3 # Copyright (c) 2011 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 1460 matching lines...) Expand 10 before | Expand all | Expand 10 after
1471 'IsShader': { 1471 'IsShader': {
1472 'type': 'Is', 1472 'type': 'Is',
1473 'decoder_func': 'DoIsShader', 1473 'decoder_func': 'DoIsShader',
1474 'expectation': False, 1474 'expectation': False,
1475 }, 1475 },
1476 'IsTexture': { 1476 'IsTexture': {
1477 'type': 'Is', 1477 'type': 'Is',
1478 'decoder_func': 'DoIsTexture', 1478 'decoder_func': 'DoIsTexture',
1479 'expectation': False, 1479 'expectation': False,
1480 }, 1480 },
1481 'LinkProgram': {'decoder_func': 'DoLinkProgram'}, 1481 'LinkProgram': {
1482 'decoder_func': 'DoLinkProgram',
1483 'impl_func': False,
1484 },
1482 'MapBufferSubDataCHROMIUM': { 1485 'MapBufferSubDataCHROMIUM': {
1483 'gen_cmd': False, 1486 'gen_cmd': False,
1484 'extension': True, 1487 'extension': True,
1485 'chromium': True, 1488 'chromium': True,
1486 }, 1489 },
1487 'MapTexSubImage2DCHROMIUM': { 1490 'MapTexSubImage2DCHROMIUM': {
1488 'gen_cmd': False, 1491 'gen_cmd': False,
1489 'extension': True, 1492 'extension': True,
1490 'chromium': True, 1493 'chromium': True,
1491 }, 1494 },
(...skipping 1564 matching lines...) Expand 10 before | Expand all | Expand 10 after
3056 """Overrriden from TypeHandler.""" 3059 """Overrriden from TypeHandler."""
3057 file.Write("%s %s(%s) {\n" % 3060 file.Write("%s %s(%s) {\n" %
3058 (func.return_type, func.original_name, 3061 (func.return_type, func.original_name,
3059 func.MakeTypedOriginalArgString(""))) 3062 func.MakeTypedOriginalArgString("")))
3060 func.WriteDestinationInitalizationValidation(file) 3063 func.WriteDestinationInitalizationValidation(file)
3061 self.WriteClientGLCallLog(func, file) 3064 self.WriteClientGLCallLog(func, file)
3062 for arg in func.GetOriginalArgs(): 3065 for arg in func.GetOriginalArgs():
3063 arg.WriteClientSideValidationCode(file, func) 3066 arg.WriteClientSideValidationCode(file, func)
3064 file.Write( 3067 file.Write(
3065 " GPU_CLIENT_DCHECK(%s != 0);\n" % func.GetOriginalArgs()[-1].name) 3068 " GPU_CLIENT_DCHECK(%s != 0);\n" % func.GetOriginalArgs()[-1].name)
3066 file.Write(" program_and_shader_id_handler_->FreeIds(1, &%s);\n" % 3069 file.Write(" DeleteProgramOrShaderHelper(%s);\n" %
3067 func.GetOriginalArgs()[-1].name) 3070 func.GetOriginalArgs()[-1].name)
3068 file.Write(" helper_->%s(%s);\n" % 3071 file.Write(" helper_->%s(%s);\n" %
3069 (func.name, func.MakeCmdArgString(""))) 3072 (func.name, func.MakeCmdArgString("")))
3070 file.Write("}\n") 3073 file.Write("}\n")
3071 file.Write("\n") 3074 file.Write("\n")
3072 3075
3073 3076
3074 class DELnHandler(TypeHandler): 3077 class DELnHandler(TypeHandler):
3075 """Handler for glDelete___ type functions.""" 3078 """Handler for glDelete___ type functions."""
3076 3079
(...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after
5939 5942
5940 if options.generate_docs: 5943 if options.generate_docs:
5941 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") 5944 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h")
5942 5945
5943 if gen.errors > 0: 5946 if gen.errors > 0:
5944 print "%d errors" % gen.errors 5947 print "%d errors" % gen.errors
5945 sys.exit(1) 5948 sys.exit(1)
5946 5949
5947 if __name__ == '__main__': 5950 if __name__ == '__main__':
5948 main(sys.argv[1:]) 5951 main(sys.argv[1:])
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | gpu/command_buffer/client/gles2_implementation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698