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

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

Issue 9466042: Revert 123696 - Add Pepper support for several GL extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 | ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h » ('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/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 os 8 import os
9 import os.path 9 import os.path
10 import sys 10 import sys
(...skipping 713 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 'type': 'GLboolean', 724 'type': 'GLboolean',
725 'valid': [ 725 'valid': [
726 'false', 726 'false',
727 ], 727 ],
728 'invalid': [ 728 'invalid': [
729 'true', 729 'true',
730 ], 730 ],
731 }, 731 },
732 } 732 }
733 733
734 # This table specifies the different pepper interfaces that are supported for
735 # GL commands. 'dev' is true if it's a dev interface.
736 _PEPPER_INTERFACES = [
737 {'name': '', 'dev': False},
738 {'name': 'InstancedArrays', 'dev': True},
739 {'name': 'FramebufferBlit', 'dev': True},
740 {'name': 'FramebufferMultisample', 'dev': True},
741 {'name': 'ChromiumEnableFeature', 'dev': True},
742 {'name': 'ChromiumMapSub', 'dev': True},
743 ]
744
745 # This table specifies types and other special data for the commands that 734 # This table specifies types and other special data for the commands that
746 # will be generated. 735 # will be generated.
747 # 736 #
748 # cmd_comment: A comment added to the cmd format. 737 # cmd_comment: A comment added to the cmd format.
749 # type: defines which handler will be used to generate code. 738 # type: defines which handler will be used to generate code.
750 # decoder_func: defines which function to call in the decoder to execute the 739 # decoder_func: defines which function to call in the decoder to execute the
751 # corresponding GL command. If not specified the GL command will 740 # corresponding GL command. If not specified the GL command will
752 # be called directly. 741 # be called directly.
753 # gl_test_func: GL function that is expected to be called when testing. 742 # gl_test_func: GL function that is expected to be called when testing.
754 # cmd_args: The arguments to use for the command. This overrides generating 743 # cmd_args: The arguments to use for the command. This overrides generating
(...skipping 12 matching lines...) Expand all
767 # needs_size: If true a data_size field is added to the command. 756 # needs_size: If true a data_size field is added to the command.
768 # data_type: The type of data the command uses. For PUTn or PUT types. 757 # data_type: The type of data the command uses. For PUTn or PUT types.
769 # count: The number of units per element. For PUTn or PUT types. 758 # count: The number of units per element. For PUTn or PUT types.
770 # unit_test: If False no service side unit test will be generated. 759 # unit_test: If False no service side unit test will be generated.
771 # client_test: If False no client side unit test will be generated. 760 # client_test: If False no client side unit test will be generated.
772 # expectation: If False the unit test will have no expected calls. 761 # expectation: If False the unit test will have no expected calls.
773 # gen_func: Name of function that generates GL resource for corresponding 762 # gen_func: Name of function that generates GL resource for corresponding
774 # bind function. 763 # bind function.
775 # valid_args: A dictionary of argument indices to args to use in unit tests 764 # valid_args: A dictionary of argument indices to args to use in unit tests
776 # when they can not be automatically determined. 765 # when they can not be automatically determined.
777 # pepper_interface: The pepper interface that is used for this extension
778 766
779 _FUNCTION_INFO = { 767 _FUNCTION_INFO = {
780 'ActiveTexture': { 768 'ActiveTexture': {
781 'decoder_func': 'DoActiveTexture', 769 'decoder_func': 'DoActiveTexture',
782 'unit_test': False, 770 'unit_test': False,
783 'impl_func': False, 771 'impl_func': False,
784 'client_test': False, 772 'client_test': False,
785 }, 773 },
786 'AttachShader': {'decoder_func': 'DoAttachShader'}, 774 'AttachShader': {'decoder_func': 'DoAttachShader'},
787 'BindAttribLocation': {'type': 'GLchar', 'bucket': True, 'needs_size': True}, 775 'BindAttribLocation': {'type': 'GLchar', 'bucket': True, 'needs_size': True},
(...skipping 16 matching lines...) Expand all
804 }, 792 },
805 'BindTexture': { 793 'BindTexture': {
806 'type': 'Bind', 794 'type': 'Bind',
807 'decoder_func': 'DoBindTexture', 795 'decoder_func': 'DoBindTexture',
808 'gen_func': 'GenTextures', 796 'gen_func': 'GenTextures',
809 }, 797 },
810 'BlitFramebufferEXT': { 798 'BlitFramebufferEXT': {
811 'decoder_func': 'DoBlitFramebufferEXT', 799 'decoder_func': 'DoBlitFramebufferEXT',
812 'unit_test': False, 800 'unit_test': False,
813 'extension': True, 801 'extension': True,
814 'pepper_interface': 'FramebufferBlit',
815 }, 802 },
816 'BufferData': { 803 'BufferData': {
817 'type': 'Manual', 804 'type': 'Manual',
818 'immediate': True, 805 'immediate': True,
819 'client_test': False, 806 'client_test': False,
820 }, 807 },
821 'BufferSubData': { 808 'BufferSubData': {
822 'type': 'Data', 809 'type': 'Data',
823 'client_test': False, 810 'client_test': False,
824 'decoder_func': 'DoBufferSubData', 811 'decoder_func': 'DoBufferSubData',
(...skipping 15 matching lines...) Expand all
840 'ClearStencil': {'decoder_func': 'DoClearStencil'}, 827 'ClearStencil': {'decoder_func': 'DoClearStencil'},
841 'EnableFeatureCHROMIUM': { 828 'EnableFeatureCHROMIUM': {
842 'type': 'Custom', 829 'type': 'Custom',
843 'immediate': False, 830 'immediate': False,
844 'decoder_func': 'DoEnableFeatureCHROMIUM', 831 'decoder_func': 'DoEnableFeatureCHROMIUM',
845 'expectation': False, 832 'expectation': False,
846 'cmd_args': 'GLuint bucket_id, GLint* result', 833 'cmd_args': 'GLuint bucket_id, GLint* result',
847 'result': ['GLint'], 834 'result': ['GLint'],
848 'extension': True, 835 'extension': True,
849 'chromium': True, 836 'chromium': True,
850 'pepper_interface': 'ChromiumEnableFeature',
851 }, 837 },
852 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False}, 838 'CompileShader': {'decoder_func': 'DoCompileShader', 'unit_test': False},
853 'CompressedTexImage2D': { 839 'CompressedTexImage2D': {
854 'type': 'Manual', 840 'type': 'Manual',
855 'immediate': True, 841 'immediate': True,
856 'bucket': True, 842 'bucket': True,
857 }, 843 },
858 'CompressedTexSubImage2D': { 844 'CompressedTexSubImage2D': {
859 'type': 'Data', 845 'type': 'Data',
860 'bucket': True, 846 'bucket': True,
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
1194 }, 1180 },
1195 'LinkProgram': { 1181 'LinkProgram': {
1196 'decoder_func': 'DoLinkProgram', 1182 'decoder_func': 'DoLinkProgram',
1197 'impl_func': False, 1183 'impl_func': False,
1198 }, 1184 },
1199 'MapBufferSubDataCHROMIUM': { 1185 'MapBufferSubDataCHROMIUM': {
1200 'gen_cmd': False, 1186 'gen_cmd': False,
1201 'extension': True, 1187 'extension': True,
1202 'chromium': True, 1188 'chromium': True,
1203 'client_test': False, 1189 'client_test': False,
1204 'pepper_interface': 'ChromiumMapSub',
1205 }, 1190 },
1206 'MapTexSubImage2DCHROMIUM': { 1191 'MapTexSubImage2DCHROMIUM': {
1207 'gen_cmd': False, 1192 'gen_cmd': False,
1208 'extension': True, 1193 'extension': True,
1209 'chromium': True, 1194 'chromium': True,
1210 'client_test': False, 1195 'client_test': False,
1211 'pepper_interface': 'ChromiumMapSub',
1212 }, 1196 },
1213 'PixelStorei': {'type': 'Manual'}, 1197 'PixelStorei': {'type': 'Manual'},
1214 'PostSubBufferCHROMIUM': { 1198 'PostSubBufferCHROMIUM': {
1215 'type': 'Custom', 1199 'type': 'Custom',
1216 'impl_func': False, 1200 'impl_func': False,
1217 'unit_test': False, 1201 'unit_test': False,
1218 'client_test': False, 1202 'client_test': False,
1219 'extension': True, 1203 'extension': True,
1220 'chromium': True, 1204 'chromium': True,
1221 }, 1205 },
1222 'RenderbufferStorage': { 1206 'RenderbufferStorage': {
1223 'decoder_func': 'DoRenderbufferStorage', 1207 'decoder_func': 'DoRenderbufferStorage',
1224 'gl_test_func': 'glRenderbufferStorageEXT', 1208 'gl_test_func': 'glRenderbufferStorageEXT',
1225 'expectation': False, 1209 'expectation': False,
1226 }, 1210 },
1227 'RenderbufferStorageMultisampleEXT': { 1211 'RenderbufferStorageMultisampleEXT': {
1228 'decoder_func': 'DoRenderbufferStorageMultisample', 1212 'decoder_func': 'DoRenderbufferStorageMultisample',
1229 'gl_test_func': 'glRenderbufferStorageMultisampleEXT', 1213 'gl_test_func': 'glRenderbufferStorageMultisampleEXT',
1230 'expectation': False, 1214 'expectation': False,
1231 'unit_test': False, 1215 'unit_test': False,
1232 'extension': True, 1216 'extension': True,
1233 'pepper_interface': 'FramebufferMultisample',
1234 }, 1217 },
1235 'ReadPixels': { 1218 'ReadPixels': {
1236 'cmd_comment': 1219 'cmd_comment':
1237 '// ReadPixels has the result separated from the pixel buffer so that\n' 1220 '// ReadPixels has the result separated from the pixel buffer so that\n'
1238 '// it is easier to specify the result going to some specific place\n' 1221 '// it is easier to specify the result going to some specific place\n'
1239 '// that exactly fits the rectangle of pixels.\n', 1222 '// that exactly fits the rectangle of pixels.\n',
1240 'type': 'Custom', 1223 'type': 'Custom',
1241 'immediate': False, 1224 'immediate': False,
1242 'impl_func': False, 1225 'impl_func': False,
1243 'client_test': False, 1226 'client_test': False,
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
1400 'type': 'PUTn', 1383 'type': 'PUTn',
1401 'data_type': 'GLfloat', 1384 'data_type': 'GLfloat',
1402 'count': 16, 1385 'count': 16,
1403 'decoder_func': 'DoUniformMatrix4fv', 1386 'decoder_func': 'DoUniformMatrix4fv',
1404 }, 1387 },
1405 'UnmapBufferSubDataCHROMIUM': { 1388 'UnmapBufferSubDataCHROMIUM': {
1406 'gen_cmd': False, 1389 'gen_cmd': False,
1407 'extension': True, 1390 'extension': True,
1408 'chromium': True, 1391 'chromium': True,
1409 'client_test': False, 1392 'client_test': False,
1410 'pepper_interface': 'ChromiumMapSub', 1393 },
1411 },
1412 'UnmapTexSubImage2DCHROMIUM': { 1394 'UnmapTexSubImage2DCHROMIUM': {
1413 'gen_cmd': False, 1395 'gen_cmd': False,
1414 'extension': True, 1396 'extension': True,
1415 'chromium': True, 1397 'chromium': True,
1416 'client_test': False, 1398 'client_test': False,
1417 'pepper_interface': 'ChromiumMapSub',
1418 }, 1399 },
1419 'UseProgram': {'decoder_func': 'DoUseProgram', 'unit_test': False}, 1400 'UseProgram': {'decoder_func': 'DoUseProgram', 'unit_test': False},
1420 'ValidateProgram': {'decoder_func': 'DoValidateProgram'}, 1401 'ValidateProgram': {'decoder_func': 'DoValidateProgram'},
1421 'VertexAttrib1f': {'decoder_func': 'DoVertexAttrib1f'}, 1402 'VertexAttrib1f': {'decoder_func': 'DoVertexAttrib1f'},
1422 'VertexAttrib1fv': { 1403 'VertexAttrib1fv': {
1423 'type': 'PUT', 1404 'type': 'PUT',
1424 'data_type': 'GLfloat', 1405 'data_type': 'GLfloat',
1425 'count': 1, 1406 'count': 1,
1426 'decoder_func': 'DoVertexAttrib1fv', 1407 'decoder_func': 'DoVertexAttrib1fv',
1427 }, 1408 },
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
1511 'unit_test': False, 1492 'unit_test': False,
1512 'extension': True, 1493 'extension': True,
1513 'decoder_func': 'DoTexStorage2DEXT', 1494 'decoder_func': 'DoTexStorage2DEXT',
1514 }, 1495 },
1515 'DrawArraysInstancedANGLE': { 1496 'DrawArraysInstancedANGLE': {
1516 'type': 'Manual', 1497 'type': 'Manual',
1517 'cmd_args': 'GLenumDrawMode mode, GLint first, GLsizei count, ' 1498 'cmd_args': 'GLenumDrawMode mode, GLint first, GLsizei count, '
1518 'GLsizei primcount', 1499 'GLsizei primcount',
1519 'extension': True, 1500 'extension': True,
1520 'unit_test': False, 1501 'unit_test': False,
1521 'pepper_interface': 'InstancedArrays',
1522 }, 1502 },
1523 'DrawElementsInstancedANGLE': { 1503 'DrawElementsInstancedANGLE': {
1524 'type': 'Manual', 1504 'type': 'Manual',
1525 'cmd_args': 'GLenumDrawMode mode, GLsizei count, ' 1505 'cmd_args': 'GLenumDrawMode mode, GLsizei count, '
1526 'GLenumIndexType type, GLuint index_offset, GLsizei primcount', 1506 'GLenumIndexType type, GLuint index_offset, GLsizei primcount',
1527 'extension': True, 1507 'extension': True,
1528 'unit_test': False, 1508 'unit_test': False,
1529 'client_test': False, 1509 'client_test': False,
1530 'pepper_interface': 'InstancedArrays',
1531 }, 1510 },
1532 'VertexAttribDivisorANGLE': { 1511 'VertexAttribDivisorANGLE': {
1533 'type': 'Manual', 1512 'type': 'Manual',
1534 'cmd_args': 'GLuint index, GLuint divisor', 1513 'cmd_args': 'GLuint index, GLuint divisor',
1535 'extension': True, 1514 'extension': True,
1536 'unit_test': False, 1515 'unit_test': False,
1537 'pepper_interface': 'InstancedArrays',
1538 }, 1516 },
1539 1517
1540 } 1518 }
1541 1519
1542 1520
1543 def SplitWords(input_string): 1521 def SplitWords(input_string):
1544 """Transforms a input_string into a list of lower-case components. 1522 """Transforms a input_string into a list of lower-case components.
1545 1523
1546 Args: 1524 Args:
1547 input_string: the input string. 1525 input_string: the input string.
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 not parts[ii][0] == ")" and not fptr.match(parts[ii])) 1596 not parts[ii][0] == ")" and not fptr.match(parts[ii]))
1619 and splitter < 80): 1597 and splitter < 80):
1620 return splitter 1598 return splitter
1621 splitter += len(parts[ii]) + 1 1599 splitter += len(parts[ii]) + 1
1622 done = False 1600 done = False
1623 end = len(string) 1601 end = len(string)
1624 last_splitter = -1 1602 last_splitter = -1
1625 while not done: 1603 while not done:
1626 splitter = string[0:end].rfind(',') 1604 splitter = string[0:end].rfind(',')
1627 if splitter < 0 or (splitter > 0 and string[splitter - 1] == '"'): 1605 if splitter < 0 or (splitter > 0 and string[splitter - 1] == '"'):
1628 if last_splitter == -1:
1629 break
1630 return last_splitter
1631 elif splitter >= 80:
1632 end = splitter
1633 else:
1634 return splitter
1635 end = len(string)
1636 last_splitter = -1
1637 while not done:
1638 splitter = string[0:end].rfind(' ')
1639 if splitter < 0 or (splitter > 0 and string[splitter - 1] == '"'):
1640 return last_splitter 1606 return last_splitter
1641 elif splitter >= 80: 1607 elif splitter >= 80:
1642 end = splitter 1608 end = splitter
1643 else: 1609 else:
1644 return splitter 1610 return splitter
1645 1611
1646 def __WriteLine(self, line, ends_with_eol): 1612 def __WriteLine(self, line, ends_with_eol):
1647 """Given a signle line, writes it to a file, splitting if it's > 80 chars""" 1613 """Given a signle line, writes it to a file, splitting if it's > 80 chars"""
1648 if len(line) >= 80: 1614 if len(line) >= 80:
1649 i = self.__FindSplit(line) 1615 i = self.__FindSplit(line)
1650 if i > 0: 1616 if i > 0:
1651 line1 = line[0:i + 1] 1617 line1 = line[0:i + 1]
1652 if line1[-1] == ' ':
1653 line1 = line1[:-1]
1654 lineend = ''
1655 if line1[0] == '#':
1656 lineend = ' \\'
1657 nolint = '' 1618 nolint = ''
1658 if len(line1) > 80: 1619 if len(line1) > 80:
1659 nolint = ' // NOLINT' 1620 nolint = ' // NOLINT'
1660 self.__AddLine(line1 + nolint + lineend + '\n') 1621 self.__AddLine(line1 + nolint + '\n')
1661 match = re.match("( +)", line1) 1622 match = re.match("( +)", line1)
1662 indent = "" 1623 indent = ""
1663 if match: 1624 if match:
1664 indent = match.group(1) 1625 indent = match.group(1)
1665 splitter = line[i] 1626 splitter = line[i]
1666 if not splitter == ',': 1627 if not splitter == ',':
1667 indent = " " + indent 1628 indent = " " + indent
1668 self.__WriteLine(indent + line[i + 1:].lstrip(), True) 1629 self.__WriteLine(indent + line[i + 1:].lstrip(), True)
1669 return 1630 return
1670 nolint = '' 1631 nolint = ''
(...skipping 3309 matching lines...) Expand 10 before | Expand all | Expand 10 after
4980 return valid_args[str(index)] 4941 return valid_args[str(index)]
4981 return None 4942 return None
4982 4943
4983 def AddInfo(self, name, value): 4944 def AddInfo(self, name, value):
4984 """Adds an info.""" 4945 """Adds an info."""
4985 setattr(self.info, name, value) 4946 setattr(self.info, name, value)
4986 4947
4987 def IsCoreGLFunction(self): 4948 def IsCoreGLFunction(self):
4988 return not self.GetInfo('extension') 4949 return not self.GetInfo('extension')
4989 4950
4990 def InPepperInterface(self, interface):
4991 ext = self.GetInfo('pepper_interface')
4992 if not interface.GetName():
4993 return self.IsCoreGLFunction()
4994 return ext == interface.GetName()
4995
4996 def InAnyPepperExtension(self):
4997 return self.IsCoreGLFunction() or self.GetInfo('pepper_interface')
4998
4999 def GetGLFunctionName(self): 4951 def GetGLFunctionName(self):
5000 """Gets the function to call to execute GL for this command.""" 4952 """Gets the function to call to execute GL for this command."""
5001 if self.GetInfo('decoder_func'): 4953 if self.GetInfo('decoder_func'):
5002 return self.GetInfo('decoder_func') 4954 return self.GetInfo('decoder_func')
5003 return "gl%s" % self.original_name 4955 return "gl%s" % self.original_name
5004 4956
5005 def GetGLTestFunctionName(self): 4957 def GetGLTestFunctionName(self):
5006 gl_func_name = self.GetInfo('gl_test_func') 4958 gl_func_name = self.GetInfo('gl_test_func')
5007 if gl_func_name == None: 4959 if gl_func_name == None:
5008 gl_func_name = self.GetGLFunctionName() 4960 gl_func_name = self.GetGLFunctionName()
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
5179 5131
5180 def WriteDestinationInitalizationValidation(self, file): 5132 def WriteDestinationInitalizationValidation(self, file):
5181 """Writes the client side destintion initialization validation.""" 5133 """Writes the client side destintion initialization validation."""
5182 self.type_handler.WriteDestinationInitalizationValidation(self, file) 5134 self.type_handler.WriteDestinationInitalizationValidation(self, file)
5183 5135
5184 def WriteFormatTest(self, file): 5136 def WriteFormatTest(self, file):
5185 """Writes the cmd's format test.""" 5137 """Writes the cmd's format test."""
5186 self.type_handler.WriteFormatTest(self, file) 5138 self.type_handler.WriteFormatTest(self, file)
5187 5139
5188 5140
5189 class PepperInterface(object):
5190 """A class that represents a function."""
5191
5192 def __init__(self, info):
5193 self.name = info["name"]
5194 self.dev = info["dev"]
5195
5196 def GetName(self):
5197 return self.name
5198
5199 def GetInterfaceName(self):
5200 upperint = ""
5201 dev = ""
5202 if self.name:
5203 upperint = "_" + self.name.upper()
5204 if self.dev:
5205 dev = "_DEV"
5206 return "PPB_OPENGLES2%s%s_INTERFACE" % (upperint, dev)
5207
5208 def GetInterfaceString(self):
5209 dev = ""
5210 if self.dev:
5211 dev = "(Dev)"
5212 return "PPB_OpenGLES2%s%s" % (self.name, dev)
5213
5214 def GetStructName(self):
5215 dev = ""
5216 if self.dev:
5217 dev = "_Dev"
5218 return "PPB_OpenGLES2%s%s" % (self.name, dev)
5219
5220
5221 class ImmediateFunction(Function): 5141 class ImmediateFunction(Function):
5222 """A class that represnets an immediate function command.""" 5142 """A class that represnets an immediate function command."""
5223 5143
5224 def __init__(self, func): 5144 def __init__(self, func):
5225 new_args = [] 5145 new_args = []
5226 for arg in func.GetOriginalArgs(): 5146 for arg in func.GetOriginalArgs():
5227 new_arg = arg.GetImmediateVersion() 5147 new_arg = arg.GetImmediateVersion()
5228 if new_arg: 5148 if new_arg:
5229 new_args.append(new_arg) 5149 new_args.append(new_arg)
5230 5150
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
5409 _function_re = re.compile(r'GL_APICALL(.*?)GL_APIENTRY (.*?) \((.*?)\);') 5329 _function_re = re.compile(r'GL_APICALL(.*?)GL_APIENTRY (.*?) \((.*?)\);')
5410 5330
5411 def __init__(self, verbose): 5331 def __init__(self, verbose):
5412 self.original_functions = [] 5332 self.original_functions = []
5413 self.functions = [] 5333 self.functions = []
5414 self.verbose = verbose 5334 self.verbose = verbose
5415 self.errors = 0 5335 self.errors = 0
5416 self._function_info = {} 5336 self._function_info = {}
5417 self._empty_type_handler = TypeHandler() 5337 self._empty_type_handler = TypeHandler()
5418 self._empty_function_info = FunctionInfo({}, self._empty_type_handler) 5338 self._empty_function_info = FunctionInfo({}, self._empty_type_handler)
5419 self.pepper_interfaces = []
5420 self.interface_info = {}
5421 5339
5422 self._type_handlers = { 5340 self._type_handlers = {
5423 'Bind': BindHandler(), 5341 'Bind': BindHandler(),
5424 'Create': CreateHandler(), 5342 'Create': CreateHandler(),
5425 'Custom': CustomHandler(), 5343 'Custom': CustomHandler(),
5426 'Data': DataHandler(), 5344 'Data': DataHandler(),
5427 'Delete': DeleteHandler(), 5345 'Delete': DeleteHandler(),
5428 'DELn': DELnHandler(), 5346 'DELn': DELnHandler(),
5429 'GENn': GENnHandler(), 5347 'GENn': GENnHandler(),
5430 'GETn': GETnHandler(), 5348 'GETn': GETnHandler(),
5431 'GLchar': GLcharHandler(), 5349 'GLchar': GLcharHandler(),
5432 'HandWritten': HandWrittenHandler(), 5350 'HandWritten': HandWrittenHandler(),
5433 'Is': IsHandler(), 5351 'Is': IsHandler(),
5434 'Manual': ManualHandler(), 5352 'Manual': ManualHandler(),
5435 'PUT': PUTHandler(), 5353 'PUT': PUTHandler(),
5436 'PUTn': PUTnHandler(), 5354 'PUTn': PUTnHandler(),
5437 'PUTXn': PUTXnHandler(), 5355 'PUTXn': PUTXnHandler(),
5438 'STRn': STRnHandler(), 5356 'STRn': STRnHandler(),
5439 'Todo': TodoHandler(), 5357 'Todo': TodoHandler(),
5440 } 5358 }
5441 5359
5442 for func_name in _FUNCTION_INFO: 5360 for func_name in _FUNCTION_INFO:
5443 info = _FUNCTION_INFO[func_name] 5361 info = _FUNCTION_INFO[func_name]
5444 type = '' 5362 type = ''
5445 if 'type' in info: 5363 if 'type' in info:
5446 type = info['type'] 5364 type = info['type']
5447 self._function_info[func_name] = FunctionInfo(info, 5365 self._function_info[func_name] = FunctionInfo(info,
5448 self.GetTypeHandler(type)) 5366 self.GetTypeHandler(type))
5449 for interface in _PEPPER_INTERFACES:
5450 interface = PepperInterface(interface)
5451 self.pepper_interfaces.append(interface)
5452 self.interface_info[interface.GetName()] = interface
5453 5367
5454 def AddFunction(self, func): 5368 def AddFunction(self, func):
5455 """Adds a function.""" 5369 """Adds a function."""
5456 self.functions.append(func) 5370 self.functions.append(func)
5457 5371
5458 def GetTypeHandler(self, name): 5372 def GetTypeHandler(self, name):
5459 """Gets a type info for the given type.""" 5373 """Gets a type info for the given type."""
5460 if name in self._type_handlers: 5374 if name in self._type_handlers:
5461 return self._type_handlers[name] 5375 return self._type_handlers[name]
5462 return self._empty_type_handler 5376 return self._empty_type_handler
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
5805 5719
5806 """) 5720 """)
5807 else: 5721 else:
5808 file.Write(""" return GLES2Util::GetQualifiedEnumString( 5722 file.Write(""" return GLES2Util::GetQualifiedEnumString(
5809 NULL, 0, value); 5723 NULL, 0, value);
5810 } 5724 }
5811 5725
5812 """) 5726 """)
5813 file.Close() 5727 file.Close()
5814 5728
5815 def WritePepperGLES2Interface(self, filename, dev): 5729 def WritePepperGLES2Interface(self, filename):
5816 """Writes the Pepper OpenGLES interface definition.""" 5730 """Writes the Pepper OpenGLES interface definition."""
5817 file = CHeaderWriter( 5731 file = CHeaderWriter(
5818 filename, 5732 filename,
5819 "// OpenGL ES interface.\n", 5733 "// OpenGL ES interface.\n",
5820 2) 5734 3)
5821 5735
5822 file.Write("#include \"ppapi/c/pp_resource.h\"\n") 5736 file.Write("#include \"ppapi/c/pp_resource.h\"\n\n")
5823 if dev:
5824 file.Write("#include \"ppapi/c/ppb_opengles2.h\"\n\n")
5825 else:
5826 file.Write("\n#ifndef __gl2_h_\n")
5827 for (k, v) in _GL_TYPES.iteritems():
5828 file.Write("typedef %s %s;\n" % (v, k))
5829 file.Write("#endif // __gl2_h_\n\n")
5830 5737
5831 for interface in self.pepper_interfaces: 5738 file.Write("#ifndef __gl2_h_\n")
5832 if interface.dev != dev: 5739 for (k, v) in _GL_TYPES.iteritems():
5740 file.Write("typedef %s %s;\n" % (v, k))
5741 file.Write("#endif // __gl2_h_\n\n")
5742
5743 file.Write("#define PPB_OPENGLES2_INTERFACE_1_0 \"PPB_OpenGLES2;1.0\"\n")
5744 file.Write("#define PPB_OPENGLES2_INTERFACE PPB_OPENGLES2_INTERFACE_1_0\n")
5745
5746 file.Write("\nstruct PPB_OpenGLES2 {\n")
5747 for func in self.original_functions:
5748 if not func.IsCoreGLFunction():
5833 continue 5749 continue
5834 file.Write("#define %s_1_0 \"%s;1.0\"\n" %
5835 (interface.GetInterfaceName(), interface.GetInterfaceString()))
5836 file.Write("#define %s %s_1_0\n" %
5837 (interface.GetInterfaceName(), interface.GetInterfaceName()))
5838 5750
5839 file.Write("\nstruct %s {\n" % interface.GetStructName()) 5751 original_arg = func.MakeTypedOriginalArgString("")
5840 for func in self.original_functions: 5752 context_arg = "PP_Resource context"
5841 if not func.InPepperInterface(interface): 5753 if len(original_arg):
5842 continue 5754 arg = context_arg + ", " + original_arg
5843 5755 else:
5844 original_arg = func.MakeTypedOriginalArgString("") 5756 arg = context_arg
5845 context_arg = "PP_Resource context" 5757 file.Write(" %s (*%s)(%s);\n" % (func.return_type, func.name, arg))
5846 if len(original_arg): 5758 file.Write("};\n\n")
5847 arg = context_arg + ", " + original_arg
5848 else:
5849 arg = context_arg
5850 file.Write(" %s (*%s)(%s);\n" % (func.return_type, func.name, arg))
5851 file.Write("};\n\n")
5852
5853 5759
5854 file.Close() 5760 file.Close()
5855 5761
5856 def WritePepperGLES2Implementation(self, filename): 5762 def WritePepperGLES2Implementation(self, filename):
5857 """Writes the Pepper OpenGLES interface implementation.""" 5763 """Writes the Pepper OpenGLES interface implementation."""
5858 5764
5859 file = CWriter(filename) 5765 file = CWriter(filename)
5860 file.Write(_LICENSE) 5766 file.Write(_LICENSE)
5861 file.Write(_DO_NOT_EDIT_WARNING) 5767 file.Write(_DO_NOT_EDIT_WARNING)
5862 5768
5863 file.Write("#include \"ppapi/shared_impl/ppb_opengles2_shared.h\"\n\n") 5769 file.Write("#include \"ppapi/shared_impl/ppb_opengles2_shared.h\"\n\n")
5864 file.Write("#include \"base/logging.h\"\n") 5770 file.Write("#include \"base/logging.h\"\n")
5865 file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"\n" ) 5771 file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"\n" )
5866 file.Write("#include \"ppapi/shared_impl/ppb_graphics_3d_shared.h\"\n") 5772 file.Write("#include \"ppapi/shared_impl/ppb_graphics_3d_shared.h\"\n")
5867 file.Write("#include \"ppapi/thunk/enter.h\"\n\n") 5773 file.Write("#include \"ppapi/thunk/enter.h\"\n\n")
5868 5774
5869 file.Write("namespace ppapi {\n\n") 5775 file.Write("namespace ppapi {\n\n")
5870 file.Write("namespace {\n\n") 5776 file.Write("namespace {\n\n")
5871 5777
5872 file.Write("gpu::gles2::GLES2Implementation*" 5778 file.Write("gpu::gles2::GLES2Implementation*"
5873 " GetGLES(PP_Resource context) {\n") 5779 " GetGLES(PP_Resource context) {\n")
5874 file.Write(" thunk::EnterResource<thunk::PPB_Graphics3D_API>" 5780 file.Write(" thunk::EnterResource<thunk::PPB_Graphics3D_API>"
5875 " enter_g3d(context, false);\n") 5781 " enter_g3d(context, false);\n")
5876 file.Write(" DCHECK(enter_g3d.succeeded());\n") 5782 file.Write(" DCHECK(enter_g3d.succeeded());\n")
5877 file.Write(" return static_cast<PPB_Graphics3D_Shared*>" 5783 file.Write(" return static_cast<PPB_Graphics3D_Shared*>"
5878 "(enter_g3d.object())->gles2_impl();\n") 5784 "(enter_g3d.object())->gles2_impl();\n")
5879 file.Write("}\n\n") 5785 file.Write("}\n\n")
5880 5786
5881 for func in self.original_functions: 5787 for func in self.original_functions:
5882 if not func.InAnyPepperExtension(): 5788 if not func.IsCoreGLFunction():
5883 continue 5789 continue
5884 5790
5885 original_arg = func.MakeTypedOriginalArgString("") 5791 original_arg = func.MakeTypedOriginalArgString("")
5886 context_arg = "PP_Resource context_id" 5792 context_arg = "PP_Resource context_id"
5887 if len(original_arg): 5793 if len(original_arg):
5888 arg = context_arg + ", " + original_arg 5794 arg = context_arg + ", " + original_arg
5889 else: 5795 else:
5890 arg = context_arg 5796 arg = context_arg
5891 file.Write("%s %s(%s) {\n" % (func.return_type, func.name, arg)) 5797 file.Write("%s %s(%s) {\n" % (func.return_type, func.name, arg))
5892 5798
5893 return_str = "" if func.return_type == "void" else "return " 5799 return_str = "" if func.return_type == "void" else "return "
5894 file.Write(" %sGetGLES(context_id)->%s(%s);\n" % 5800 file.Write(" %sGetGLES(context_id)->%s(%s);\n" %
5895 (return_str, func.original_name, 5801 (return_str, func.original_name,
5896 func.MakeOriginalArgString(""))) 5802 func.MakeOriginalArgString("")))
5897 file.Write("}\n\n") 5803 file.Write("}\n\n")
5898 5804
5805 file.Write("\nconst struct PPB_OpenGLES2 ppb_opengles2 = {\n")
5806 file.Write(" &")
5807 file.Write(",\n &".join(
5808 f.name for f in self.original_functions if f.IsCoreGLFunction()))
5809 file.Write("\n")
5810 file.Write("};\n\n")
5811
5899 file.Write("} // namespace\n") 5812 file.Write("} // namespace\n")
5900 5813
5901 for interface in self.pepper_interfaces: 5814 file.Write("""
5902 file.Write("const %s* PPB_OpenGLES2_Shared::Get%sInterface() {\n" % 5815 const PPB_OpenGLES2* PPB_OpenGLES2_Shared::GetInterface() {
5903 (interface.GetStructName(), interface.GetName())) 5816 return &ppb_opengles2;
5904 file.Write(" static const struct %s " 5817 }
5905 "ppb_opengles2 = {\n" % interface.GetStructName())
5906 file.Write(" &")
5907 file.Write(",\n &".join(
5908 f.name for f in self.original_functions
5909 if f.InPepperInterface(interface)))
5910 file.Write("\n")
5911 5818
5912 file.Write(" };\n") 5819 """)
5913 file.Write(" return &ppb_opengles2;\n")
5914 file.Write("}\n")
5915
5916 file.Write("} // namespace ppapi\n") 5820 file.Write("} // namespace ppapi\n")
5917 file.Close() 5821 file.Close()
5918 5822
5919 def WriteGLES2ToPPAPIBridge(self, filename): 5823 def WriteGLES2ToPPAPIBridge(self, filename):
5920 """Connects GLES2 helper library to PPB_OpenGLES2 interface""" 5824 """Connects GLES2 helper library to PPB_OpenGLES2 interface"""
5921 5825
5922 file = CWriter(filename) 5826 file = CWriter(filename)
5923 file.Write(_LICENSE) 5827 file.Write(_LICENSE)
5924 file.Write(_DO_NOT_EDIT_WARNING) 5828 file.Write(_DO_NOT_EDIT_WARNING)
5925 5829
5926 file.Write("#include <GLES2/gl2.h>\n") 5830 file.Write("#include <GLES2/gl2.h>\n")
5927 file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n") 5831 file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n")
5928 5832
5929 for func in self.original_functions: 5833 for func in self.original_functions:
5930 if not func.InAnyPepperExtension(): 5834 if not func.IsCoreGLFunction():
5931 continue 5835 continue
5932 5836
5933 interface = self.interface_info[func.GetInfo('pepper_interface') or '']
5934
5935 file.Write("%s GL_APIENTRY gl%s(%s) {\n" % 5837 file.Write("%s GL_APIENTRY gl%s(%s) {\n" %
5936 (func.return_type, func.name, 5838 (func.return_type, func.name,
5937 func.MakeTypedOriginalArgString(""))) 5839 func.MakeTypedOriginalArgString("")))
5938 return_str = "" if func.return_type == "void" else "return " 5840 return_str = "" if func.return_type == "void" else "return "
5939 interface_str = "glGet%sInterfacePPAPI()" % interface.GetName() 5841 interface_str = "glGetInterfacePPAPI()"
5940 original_arg = func.MakeOriginalArgString("") 5842 original_arg = func.MakeOriginalArgString("")
5941 context_arg = "glGetCurrentContextPPAPI()" 5843 context_arg = "glGetCurrentContextPPAPI()"
5942 if len(original_arg): 5844 if len(original_arg):
5943 arg = context_arg + ", " + original_arg 5845 arg = context_arg + ", " + original_arg
5944 else: 5846 else:
5945 arg = context_arg 5847 arg = context_arg
5946 if interface.GetName(): 5848 file.Write(" %s%s->%s(%s);\n" %
5947 file.Write(" const struct %s* ext = %s;\n" % 5849 (return_str, interface_str, func.name, arg))
5948 (interface.GetStructName(), interface_str))
5949 file.Write(" if (ext)\n")
5950 file.Write(" %sext->%s(%s);\n" %
5951 (return_str, func.name, arg))
5952 if return_str:
5953 file.Write(" %s0;\n" % return_str)
5954 else:
5955 file.Write(" %s%s->%s(%s);\n" %
5956 (return_str, interface_str, func.name, arg))
5957 file.Write("}\n\n") 5850 file.Write("}\n\n")
5958 file.Close()
5959 5851
5960 def WritePepperGLES2NaClProxy(self, filename): 5852 def WritePepperGLES2NaClProxy(self, filename):
5961 """Writes the Pepper OpenGLES interface implementation for NaCl.""" 5853 """Writes the Pepper OpenGLES interface implementation for NaCl."""
5962 file = CWriter(filename) 5854 file = CWriter(filename)
5963 file.Write(_LICENSE) 5855 file.Write(_LICENSE)
5964 file.Write(_DO_NOT_EDIT_WARNING) 5856 file.Write(_DO_NOT_EDIT_WARNING)
5965 5857
5966 file.Write("#include \"native_client/src/shared/ppapi_proxy" 5858 file.Write("#include \"native_client/src/shared/ppapi_proxy"
5967 "/plugin_ppb_graphics_3d.h\"\n\n") 5859 "/plugin_ppb_graphics_3d.h\"\n\n")
5968 5860
5969 file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"") 5861 file.Write("#include \"gpu/command_buffer/client/gles2_implementation.h\"")
5970 file.Write("\n#include \"ppapi/c/ppb_opengles2.h\"\n\n") 5862 file.Write("\n#include \"native_client/src/third_party"
5863 "/ppapi/c/dev/ppb_opengles_dev.h\"\n\n")
5971 5864
5972 file.Write("using ppapi_proxy::PluginGraphics3D;\n") 5865 file.Write("using ppapi_proxy::PluginGraphics3D;\n")
5973 file.Write("using ppapi_proxy::PluginResource;\n\n") 5866 file.Write("using ppapi_proxy::PluginResource;\n\n")
5974 file.Write("namespace {\n\n") 5867 file.Write("namespace {\n\n")
5975 5868
5976 for func in self.original_functions: 5869 for func in self.original_functions:
5977 if not func.InAnyPepperExtension(): 5870 if not func.IsCoreGLFunction():
5978 continue 5871 continue
5979 args = func.MakeTypedOriginalArgString("") 5872 args = func.MakeTypedOriginalArgString("")
5980 if len(args) != 0: 5873 if len(args) != 0:
5981 args = ", " + args 5874 args = ", " + args
5982 file.Write("%s %s(PP_Resource context%s) {\n" % 5875 file.Write("%s %s(PP_Resource context%s) {\n" %
5983 (func.return_type, func.name, args)) 5876 (func.return_type, func.name, args))
5984 return_string = "return " 5877 return_string = "return "
5985 if func.return_type == "void": 5878 if func.return_type == "void":
5986 return_string = "" 5879 return_string = ""
5987 file.Write(" %sPluginGraphics3D::implFromResource(context)->" 5880 file.Write(" %sPluginGraphics3D::implFromResource(context)->"
5988 "%s(%s);\n" % 5881 "%s(%s);\n" %
5989 (return_string, 5882 (return_string,
5990 func.original_name, 5883 func.original_name,
5991 func.MakeOriginalArgString(""))) 5884 func.MakeOriginalArgString("")))
5992 file.Write("}\n") 5885 file.Write("}\n")
5993 5886
5994 file.Write("\n} // namespace\n\n") 5887 file.Write("\n} // namespace\n\n")
5995 5888
5996 for interface in self.pepper_interfaces: 5889 file.Write("const PPB_OpenGLES2* "
5997 file.Write("const %s* " 5890 "PluginGraphics3D::GetOpenGLESInterface() {\n")
5998 "PluginGraphics3D::GetOpenGLES%sInterface() {\n" %
5999 (interface.GetStructName(), interface.GetName()))
6000 5891
6001 file.Write(" const static struct %s ppb_opengles = {\n" % 5892 file.Write(" const static struct PPB_OpenGLES2 ppb_opengles = {\n")
6002 interface.GetStructName()) 5893 file.Write(" &")
6003 file.Write(" &") 5894 file.Write(",\n &".join(
6004 file.Write(",\n &".join( 5895 f.name for f in self.original_functions if f.IsCoreGLFunction()))
6005 f.name for f in self.original_functions 5896 file.Write("\n")
6006 if f.InPepperInterface(interface))) 5897 file.Write(" };\n")
6007 file.Write("\n") 5898 file.Write(" return &ppb_opengles;\n")
6008 file.Write(" };\n") 5899 file.Write("}\n")
6009 file.Write(" return &ppb_opengles;\n")
6010 file.Write("}\n")
6011 file.Close() 5900 file.Close()
6012 5901
6013 5902
6014 def main(argv): 5903 def main(argv):
6015 """This is the main function.""" 5904 """This is the main function."""
6016 parser = OptionParser() 5905 parser = OptionParser()
6017 parser.add_option( 5906 parser.add_option(
6018 "-g", "--generate-implementation-templates", action="store_true", 5907 "-g", "--generate-implementation-templates", action="store_true",
6019 help="generates files that are generally hand edited..") 5908 help="generates files that are generally hand edited..")
6020 parser.add_option( 5909 parser.add_option(
(...skipping 19 matching lines...) Expand all
6040 gen = GLGenerator(options.verbose) 5929 gen = GLGenerator(options.verbose)
6041 gen.ParseGLH("common/GLES2/gl2.h") 5930 gen.ParseGLH("common/GLES2/gl2.h")
6042 5931
6043 # Support generating files under gen/ 5932 # Support generating files under gen/
6044 if options.output_dir != None: 5933 if options.output_dir != None:
6045 os.chdir(options.output_dir) 5934 os.chdir(options.output_dir)
6046 5935
6047 if options.alternate_mode == "ppapi": 5936 if options.alternate_mode == "ppapi":
6048 # To trigger this action, do "make ppapi_gles_bindings" 5937 # To trigger this action, do "make ppapi_gles_bindings"
6049 os.chdir("ppapi"); 5938 os.chdir("ppapi");
6050 gen.WritePepperGLES2Interface("c/ppb_opengles2.h", False) 5939 gen.WritePepperGLES2Interface("c/ppb_opengles2.h")
6051 gen.WritePepperGLES2Interface("c/dev/ppb_opengles2ext_dev.h", True)
6052 gen.WriteGLES2ToPPAPIBridge("lib/gl/gles2/gles2.c") 5940 gen.WriteGLES2ToPPAPIBridge("lib/gl/gles2/gles2.c")
6053 5941
6054 elif options.alternate_mode == "chrome_ppapi": 5942 elif options.alternate_mode == "chrome_ppapi":
6055 # To trigger this action, do "make ppapi_gles_implementation" 5943 # To trigger this action, do "make ppapi_gles_implementation"
6056 gen.WritePepperGLES2Implementation( 5944 gen.WritePepperGLES2Implementation(
6057 "ppapi/shared_impl/ppb_opengles2_shared.cc") 5945 "ppapi/shared_impl/ppb_opengles2_shared.cc")
6058 5946
6059 elif options.alternate_mode == "nacl_ppapi": 5947 elif options.alternate_mode == "nacl_ppapi":
6060 os.chdir("ppapi")
6061 gen.WritePepperGLES2NaClProxy( 5948 gen.WritePepperGLES2NaClProxy(
6062 "native_client/src/shared/ppapi_proxy/plugin_opengles.cc") 5949 "native_client/src/shared/ppapi_proxy/plugin_opengles.cc")
6063 5950
6064 else: 5951 else:
6065 os.chdir("gpu/command_buffer") 5952 os.chdir("gpu/command_buffer")
6066 gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h") 5953 gen.WriteCommandIds("common/gles2_cmd_ids_autogen.h")
6067 gen.WriteFormat("common/gles2_cmd_format_autogen.h") 5954 gen.WriteFormat("common/gles2_cmd_format_autogen.h")
6068 gen.WriteFormatTest("common/gles2_cmd_format_test_autogen.h") 5955 gen.WriteFormatTest("common/gles2_cmd_format_test_autogen.h")
6069 gen.WriteGLES2ImplementationHeader("client/gles2_implementation_autogen.h") 5956 gen.WriteGLES2ImplementationHeader("client/gles2_implementation_autogen.h")
6070 gen.WriteGLES2ImplementationUnitTests( 5957 gen.WriteGLES2ImplementationUnitTests(
6071 "client/gles2_implementation_unittest_autogen.h") 5958 "client/gles2_implementation_unittest_autogen.h")
6072 gen.WriteGLES2CLibImplementation("client/gles2_c_lib_autogen.h") 5959 gen.WriteGLES2CLibImplementation("client/gles2_c_lib_autogen.h")
6073 gen.WriteCmdHelperHeader("client/gles2_cmd_helper_autogen.h") 5960 gen.WriteCmdHelperHeader("client/gles2_cmd_helper_autogen.h")
6074 gen.WriteServiceImplementation("service/gles2_cmd_decoder_autogen.h") 5961 gen.WriteServiceImplementation("service/gles2_cmd_decoder_autogen.h")
6075 gen.WriteServiceUnitTests("service/gles2_cmd_decoder_unittest_%d_autogen.h") 5962 gen.WriteServiceUnitTests("service/gles2_cmd_decoder_unittest_%d_autogen.h")
6076 gen.WriteServiceUtilsHeader("service/gles2_cmd_validation_autogen.h") 5963 gen.WriteServiceUtilsHeader("service/gles2_cmd_validation_autogen.h")
6077 gen.WriteServiceUtilsImplementation( 5964 gen.WriteServiceUtilsImplementation(
6078 "service/gles2_cmd_validation_implementation_autogen.h") 5965 "service/gles2_cmd_validation_implementation_autogen.h")
6079 gen.WriteCommonUtilsHeader("common/gles2_cmd_utils_autogen.h") 5966 gen.WriteCommonUtilsHeader("common/gles2_cmd_utils_autogen.h")
6080 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h") 5967 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h")
6081 5968
6082 if gen.errors > 0: 5969 if gen.errors > 0:
6083 print "%d errors" % gen.errors 5970 print "%d errors" % gen.errors
6084 return 1 5971 return 1
6085 return 0 5972 return 0
6086 5973
6087 5974
6088 if __name__ == '__main__': 5975 if __name__ == '__main__':
6089 sys.exit(main(sys.argv[1:])) 5976 sys.exit(main(sys.argv[1:]))
OLDNEW
« no previous file with comments | « no previous file | ppapi/c/dev/ppb_gles_chromium_texture_mapping_dev.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698