Chromium Code Reviews| Index: gpu/command_buffer/build_gles2_cmd_buffer.py |
| diff --git a/gpu/command_buffer/build_gles2_cmd_buffer.py b/gpu/command_buffer/build_gles2_cmd_buffer.py |
| index 44cfccc05e92052f09357ccaf3737cefbaca7c03..f2ce35c4ddca4d028f4b630d1d1d6c9683f1aa0a 100755 |
| --- a/gpu/command_buffer/build_gles2_cmd_buffer.py |
| +++ b/gpu/command_buffer/build_gles2_cmd_buffer.py |
| @@ -2917,6 +2917,7 @@ _FUNCTION_INFO = { |
| 'gl_test_func': 'glGenFramebuffersEXT', |
| 'resource_type': 'Framebuffer', |
| 'resource_types': 'Framebuffers', |
| + 'not_shared': 'True', |
| }, |
| 'GenRenderbuffers': { |
| 'type': 'GENn', 'gl_test_func': 'glGenRenderbuffersEXT', |
| @@ -2942,6 +2943,7 @@ _FUNCTION_INFO = { |
| 'resource_type': 'TransformFeedback', |
| 'resource_types': 'TransformFeedbacks', |
| 'es3': True, |
| + 'not_shared': 'True', |
| }, |
| 'GetActiveAttrib': { |
| 'type': 'Custom', |
| @@ -4245,6 +4247,7 @@ _FUNCTION_INFO = { |
| 'resource_types': 'VertexArrays', |
| 'unit_test': False, |
| 'pepper_interface': 'VertexArrayObject', |
| + 'not_shared': 'True', |
| }, |
| 'BindVertexArrayOES': { |
| 'type': 'Bind', |
| @@ -6039,12 +6042,12 @@ class GENnHandler(TypeHandler): |
| if not_shared: |
| alloc_code = ( |
| -""" IdAllocator* id_allocator = GetIdAllocator(id_namespaces::k%s); |
| +""" IdAllocator* id_allocator = GetIdAllocator(ToInt(IdNamespaces::k%s)); |
|
Zhenyao Mo
2017/05/11 22:10:57
This defeats the purpose of using enum classes. Th
Chandan
2017/05/12 12:30:31
Acknowledged.
|
| for (GLsizei ii = 0; ii < n; ++ii) |
| %s[ii] = id_allocator->AllocateID();""" % |
| (func.GetInfo('resource_types'), func.GetOriginalArgs()[1].name)) |
| else: |
| - alloc_code = (""" GetIdHandler(id_namespaces::k%(resource_types)s)-> |
| + alloc_code = (""" GetIdHandler(ToInt(SharedIdNamespaces::k%(resource_types)s))-> |
|
Chandan
2017/05/10 14:47:37
How do we format python files in chromium?
Zhenyao Mo
2017/05/11 22:10:57
You can move """... to the next line
Zhenyao Mo
2017/05/11 22:10:57
Same here.
Chandan
2017/05/12 12:30:31
Done.
|
| MakeIds(this, 0, %(args)s);""" % args) |
| args['alloc_code'] = alloc_code |
| @@ -6348,10 +6351,10 @@ TEST_P(%(test_name)s, %(name)sInvalidArgs%(arg_index)d_%(value_index)d) { |
| f.write(" GLuint client_id;\n") |
| if func.return_type == "GLsync": |
| f.write( |
| - " GetIdHandler(id_namespaces::kSyncs)->\n") |
| + " GetIdHandler(ToInt(SharedIdNamespaces::kSyncs))->\n") |
| else: |
| f.write( |
| - " GetIdHandler(id_namespaces::kProgramsAndShaders)->\n") |
| + " GetIdHandler(ToInt(SharedIdNamespaces::kProgramsAndShaders))->\n") |
| f.write(" MakeIds(this, 0, 1, &client_id);\n") |
| f.write(" helper_->%s(%s);\n" % |
| (func.name, func.MakeCmdArgString(""))) |