| OLD | NEW |
| 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 6094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6105 file.Write("} // namespace ppapi\n") | 6105 file.Write("} // namespace ppapi\n") |
| 6106 file.Close() | 6106 file.Close() |
| 6107 | 6107 |
| 6108 def WriteGLES2ToPPAPIBridge(self, filename): | 6108 def WriteGLES2ToPPAPIBridge(self, filename): |
| 6109 """Connects GLES2 helper library to PPB_OpenGLES2 interface""" | 6109 """Connects GLES2 helper library to PPB_OpenGLES2 interface""" |
| 6110 | 6110 |
| 6111 file = CWriter(filename) | 6111 file = CWriter(filename) |
| 6112 file.Write(_LICENSE) | 6112 file.Write(_LICENSE) |
| 6113 file.Write(_DO_NOT_EDIT_WARNING) | 6113 file.Write(_DO_NOT_EDIT_WARNING) |
| 6114 | 6114 |
| 6115 file.Write("#define GL_GLEXT_PROTOTYPES\n") |
| 6115 file.Write("#include <GLES2/gl2.h>\n") | 6116 file.Write("#include <GLES2/gl2.h>\n") |
| 6116 file.Write("#include <GLES2/gl2ext.h>\n") | 6117 file.Write("#include <GLES2/gl2ext.h>\n") |
| 6117 file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n") | 6118 file.Write("#include \"ppapi/lib/gl/gles2/gl2ext_ppapi.h\"\n\n") |
| 6118 | 6119 |
| 6119 for func in self.original_functions: | 6120 for func in self.original_functions: |
| 6120 if not func.InAnyPepperExtension(): | 6121 if not func.InAnyPepperExtension(): |
| 6121 continue | 6122 continue |
| 6122 | 6123 |
| 6123 interface = self.interface_info[func.GetInfo('pepper_interface') or ''] | 6124 interface = self.interface_info[func.GetInfo('pepper_interface') or ''] |
| 6124 | 6125 |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6270 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h") | 6271 gen.WriteCommonUtilsImpl("common/gles2_cmd_utils_implementation_autogen.h") |
| 6271 | 6272 |
| 6272 if gen.errors > 0: | 6273 if gen.errors > 0: |
| 6273 print "%d errors" % gen.errors | 6274 print "%d errors" % gen.errors |
| 6274 return 1 | 6275 return 1 |
| 6275 return 0 | 6276 return 0 |
| 6276 | 6277 |
| 6277 | 6278 |
| 6278 if __name__ == '__main__': | 6279 if __name__ == '__main__': |
| 6279 sys.exit(main(sys.argv[1:])) | 6280 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |