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

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

Issue 7782038: Prepare WebGL contexts for resource sharing with the compositor context. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Fix silly type-o. Created 9 years, 3 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 4543 matching lines...) Expand 10 before | Expand all | Expand 10 after
4554 def __init__(self, name, gl_type, type, gl_error): 4554 def __init__(self, name, gl_type, type, gl_error):
4555 Argument.__init__(self, name, gl_type) 4555 Argument.__init__(self, name, gl_type)
4556 4556
4557 self.local_type = type 4557 self.local_type = type
4558 self.gl_error = gl_error 4558 self.gl_error = gl_error
4559 name = type[len(gl_type):] 4559 name = type[len(gl_type):]
4560 self.type_name = name 4560 self.type_name = name
4561 self.enum_info = _ENUM_LISTS[name] 4561 self.enum_info = _ENUM_LISTS[name]
4562 4562
4563 def WriteValidationCode(self, file, func): 4563 def WriteValidationCode(self, file, func):
4564 file.Write(" if (!validators_->%s.IsValid(%s)) {\n" % 4564 file.Write(" if (!validators()->%s.IsValid(%s)) {\n" %
4565 (ToUnderscore(self.type_name), self.name)) 4565 (ToUnderscore(self.type_name), self.name))
4566 file.Write(" SetGLError(%s, \"gl%s: %s %s\");\n" % 4566 file.Write(" SetGLError(%s, \"gl%s: %s %s\");\n" %
4567 (self.gl_error, func.original_name, self.name, self.gl_error)) 4567 (self.gl_error, func.original_name, self.name, self.gl_error))
4568 file.Write(" return error::kNoError;\n") 4568 file.Write(" return error::kNoError;\n")
4569 file.Write(" }\n") 4569 file.Write(" }\n")
4570 4570
4571 def GetValidArg(self, func, offset, index): 4571 def GetValidArg(self, func, offset, index):
4572 valid_arg = func.GetValidArg(offset) 4572 valid_arg = func.GetValidArg(offset)
4573 if valid_arg != None: 4573 if valid_arg != None:
4574 return valid_arg 4574 return valid_arg
(...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after
5993 5993
5994 if options.generate_docs: 5994 if options.generate_docs:
5995 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h") 5995 gen.WriteDocs("docs/gles2_cmd_format_docs_autogen.h")
5996 5996
5997 if gen.errors > 0: 5997 if gen.errors > 0:
5998 print "%d errors" % gen.errors 5998 print "%d errors" % gen.errors
5999 sys.exit(1) 5999 sys.exit(1)
6000 6000
6001 if __name__ == '__main__': 6001 if __name__ == '__main__':
6002 main(sys.argv[1:]) 6002 main(sys.argv[1:])
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698