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

Unified Diff: gpu/command_buffer/build_gles2_cmd_buffer.py

Issue 2826043002: Do not share FBOs/VAOs/Transform feedback objects across contexts (Closed)
Patch Set: @review comments Created 3 years, 7 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 side-by-side diff with in-line comments
Download patch
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("")))
« no previous file with comments | « no previous file | gpu/command_buffer/client/gles2_implementation.h » ('j') | gpu/command_buffer/client/gles2_implementation.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698