diff options
author | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 17:54:14 +0000 |
---|---|---|
committer | jamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-10 17:54:14 +0000 |
commit | 37fd3cc51cb10faa97b17b720a7a317c1f873e48 (patch) | |
tree | 0a6c7bcaffe3c3e2aeef94350276bc72217253ab /gpu/command_buffer/build_gles2_cmd_buffer.py | |
parent | 2e79f731451fa6d4ad14819b0f31bac136e37d59 (diff) | |
download | chromium_src-37fd3cc51cb10faa97b17b720a7a317c1f873e48.zip chromium_src-37fd3cc51cb10faa97b17b720a7a317c1f873e48.tar.gz chromium_src-37fd3cc51cb10faa97b17b720a7a317c1f873e48.tar.bz2 |
Refactor id_handler set in GLES2Implementation
I plan to add some logic that will apply to all id handlers, so having
these in an array instead of 5 separate objects.
BUG=none
Review URL: http://codereview.chromium.org/8508034
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109450 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'gpu/command_buffer/build_gles2_cmd_buffer.py')
-rwxr-xr-x | gpu/command_buffer/build_gles2_cmd_buffer.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py index 22d22a9..e1051b4 100755 --- a/gpu/command_buffer/build_gles2_cmd_buffer.py +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py @@ -2818,7 +2818,7 @@ class GENnHandler(TypeHandler): 'name': func.original_name, 'typed_args': func.MakeTypedOriginalArgString(""), 'args': func.MakeOriginalArgString(""), - 'resource_type': func.name[3:-1].lower(), + 'resource_type': func.name[3:], 'count_name': func.GetOriginalArgs()[0].name, } file.Write("%(return_type)s %(name)s(%(typed_args)s) {\n" % args) @@ -2826,7 +2826,8 @@ class GENnHandler(TypeHandler): self.WriteClientGLCallLog(func, file) for arg in func.GetOriginalArgs(): arg.WriteClientSideValidationCode(file, func) - code = """ %(resource_type)s_id_handler_->MakeIds(0, %(args)s); + code = """ id_handlers_[id_namespaces::k%(resource_type)s]-> + MakeIds(0, %(args)s); helper_->%(name)sImmediate(%(args)s); %(log_code)s } @@ -3045,7 +3046,8 @@ TEST_F(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { for arg in func.GetOriginalArgs(): arg.WriteClientSideValidationCode(file, func) file.Write(" GLuint client_id;\n") - file.Write(" program_and_shader_id_handler_->MakeIds(0, 1, &client_id);\n") + file.Write(" id_handlers_[id_namespaces::kProgramsAndShaders]->\n") + file.Write(" MakeIds(0, 1, &client_id);\n") file.Write(" helper_->%s(%s);\n" % (func.name, func.MakeCmdArgString(""))) file.Write(' GPU_CLIENT_LOG("returned " << client_id);\n') |