| 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 itertools | 8 import itertools |
| 9 import os | 9 import os |
| 10 import os.path | 10 import os.path |
| (...skipping 3933 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3944 args) | 3944 args) |
| 3945 func.WriteDestinationInitalizationValidation(file) | 3945 func.WriteDestinationInitalizationValidation(file) |
| 3946 self.WriteClientGLCallLog(func, file) | 3946 self.WriteClientGLCallLog(func, file) |
| 3947 for arg in func.GetOriginalArgs(): | 3947 for arg in func.GetOriginalArgs(): |
| 3948 arg.WriteClientSideValidationCode(file, func) | 3948 arg.WriteClientSideValidationCode(file, func) |
| 3949 code = """ GPU_CLIENT_SINGLE_THREAD_CHECK(); | 3949 code = """ GPU_CLIENT_SINGLE_THREAD_CHECK(); |
| 3950 GetIdHandler(id_namespaces::k%(resource_types)s)-> | 3950 GetIdHandler(id_namespaces::k%(resource_types)s)-> |
| 3951 MakeIds(this, 0, %(args)s); | 3951 MakeIds(this, 0, %(args)s); |
| 3952 %(name)sHelper(%(args)s); | 3952 %(name)sHelper(%(args)s); |
| 3953 helper_->%(name)sImmediate(%(args)s); | 3953 helper_->%(name)sImmediate(%(args)s); |
| 3954 helper_->CommandBufferHelper::Flush(); | 3954 if (share_group_->bind_generates_resource()) |
| 3955 helper_->CommandBufferHelper::Flush(); |
| 3955 %(log_code)s | 3956 %(log_code)s |
| 3956 CheckGLError(); | 3957 CheckGLError(); |
| 3957 } | 3958 } |
| 3958 | 3959 |
| 3959 """ | 3960 """ |
| 3960 file.Write(code % args) | 3961 file.Write(code % args) |
| 3961 | 3962 |
| 3962 def WriteGLES2ImplementationUnitTest(self, func, file): | 3963 def WriteGLES2ImplementationUnitTest(self, func, file): |
| 3963 """Overrriden from TypeHandler.""" | 3964 """Overrriden from TypeHandler.""" |
| 3964 code = """ | 3965 code = """ |
| (...skipping 3922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7887 "../../mojo/public/gles2/gles2_call_visitor_autogen.h") | 7888 "../../mojo/public/gles2/gles2_call_visitor_autogen.h") |
| 7888 | 7889 |
| 7889 if gen.errors > 0: | 7890 if gen.errors > 0: |
| 7890 print "%d errors" % gen.errors | 7891 print "%d errors" % gen.errors |
| 7891 return 1 | 7892 return 1 |
| 7892 return 0 | 7893 return 0 |
| 7893 | 7894 |
| 7894 | 7895 |
| 7895 if __name__ == '__main__': | 7896 if __name__ == '__main__': |
| 7896 sys.exit(main(sys.argv[1:])) | 7897 sys.exit(main(sys.argv[1:])) |
| OLD | NEW |