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

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

Issue 11568029: Add a command to lose the context (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 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
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 2272 matching lines...) Expand 10 before | Expand all | Expand 10 after
2283 'type': 'PUTn', 2283 'type': 'PUTn',
2284 'count': 1, 2284 'count': 1,
2285 'data_type': 'GLenum', 2285 'data_type': 'GLenum',
2286 'cmd_args': 'GLenum target, GLsizei count, ' 2286 'cmd_args': 'GLenum target, GLsizei count, '
2287 'const GLenum* attachments', 2287 'const GLenum* attachments',
2288 'decoder_func': 'DoDiscardFramebufferEXT', 2288 'decoder_func': 'DoDiscardFramebufferEXT',
2289 'unit_test': False, 2289 'unit_test': False,
2290 'client_test': False, 2290 'client_test': False,
2291 'extension': True, 2291 'extension': True,
2292 }, 2292 },
2293 'LoseContextCHROMIUM': {
2294 'type': 'Manual',
2295 'impl_func': True,
2296 'extension': True,
2297 'chromium': True,
2298 },
2293 } 2299 }
2294 2300
2295 2301
2296 def Grouper(n, iterable, fillvalue=None): 2302 def Grouper(n, iterable, fillvalue=None):
2297 """Collect data into fixed-length chunks or blocks""" 2303 """Collect data into fixed-length chunks or blocks"""
2298 args = [iter(iterable)] * n 2304 args = [iter(iterable)] * n
2299 return itertools.izip_longest(fillvalue=fillvalue, *args) 2305 return itertools.izip_longest(fillvalue=fillvalue, *args)
2300 2306
2301 2307
2302 def SplitWords(input_string): 2308 def SplitWords(input_string):
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
3339 def WriteImmediateServiceImplementation(self, func, file): 3345 def WriteImmediateServiceImplementation(self, func, file):
3340 """Overrriden from TypeHandler.""" 3346 """Overrriden from TypeHandler."""
3341 pass 3347 pass
3342 3348
3343 def WriteImmediateFormatTest(self, func, file): 3349 def WriteImmediateFormatTest(self, func, file):
3344 """Overrriden from TypeHandler.""" 3350 """Overrriden from TypeHandler."""
3345 file.Write("// TODO(gman): Implement test for %s\n" % func.name) 3351 file.Write("// TODO(gman): Implement test for %s\n" % func.name)
3346 3352
3347 def WriteGLES2Implementation(self, func, file): 3353 def WriteGLES2Implementation(self, func, file):
3348 """Overrriden from TypeHandler.""" 3354 """Overrriden from TypeHandler."""
3349 pass 3355 if func.GetInfo('impl_func'):
3356 super(ManualHandler, self).WriteGLES2Implementation(func, file)
3350 3357
3351 def WriteGLES2ImplementationHeader(self, func, file): 3358 def WriteGLES2ImplementationHeader(self, func, file):
3352 """Overrriden from TypeHandler.""" 3359 """Overrriden from TypeHandler."""
3353 file.Write("virtual %s %s(%s) OVERRIDE;\n" % 3360 file.Write("virtual %s %s(%s) OVERRIDE;\n" %
3354 (func.return_type, func.original_name, 3361 (func.return_type, func.original_name,
3355 func.MakeTypedOriginalArgString(""))) 3362 func.MakeTypedOriginalArgString("")))
3356 file.Write("\n") 3363 file.Write("\n")
3357 3364
3358 def WriteImmediateCmdGetTotalSize(self, func, file): 3365 def WriteImmediateCmdGetTotalSize(self, func, file):
3359 """Overrriden from TypeHandler.""" 3366 """Overrriden from TypeHandler."""
(...skipping 4197 matching lines...) Expand 10 before | Expand all | Expand 10 after
7557 gen.WriteGLES2Header("../../third_party/khronos/GLES2/gl2chromium.h") 7564 gen.WriteGLES2Header("../../third_party/khronos/GLES2/gl2chromium.h")
7558 7565
7559 if gen.errors > 0: 7566 if gen.errors > 0:
7560 print "%d errors" % gen.errors 7567 print "%d errors" % gen.errors
7561 return 1 7568 return 1
7562 return 0 7569 return 0
7563 7570
7564 7571
7565 if __name__ == '__main__': 7572 if __name__ == '__main__':
7566 sys.exit(main(sys.argv[1:])) 7573 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/command_buffer/service/gles2_cmd_decoder.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698