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

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

Issue 162023002: Reduce internal Flush() in GL resource glGen/Delete APIs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revert lock_ pattern change in IdHandler::FreeIds. Created 6 years, 10 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
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.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 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
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
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:]))
OLDNEW
« no previous file with comments | « no previous file | gpu/command_buffer/client/cmd_buffer_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698