Chromium Code Reviews| Index: gpu/command_buffer/client/share_group.cc |
| diff --git a/gpu/command_buffer/client/share_group.cc b/gpu/command_buffer/client/share_group.cc |
| index 96ab8d181be01ab52edda453043ad4bbd451bf78..46413d17a8c07e0faf1b159049d14d156d284e88 100644 |
| --- a/gpu/command_buffer/client/share_group.cc |
| +++ b/gpu/command_buffer/client/share_group.cc |
| @@ -49,18 +49,21 @@ class IdHandler : public IdHandlerInterface { |
| virtual bool FreeIds( |
| GLES2Implementation* gl_impl, |
| GLsizei n, const GLuint* ids, DeleteFn delete_fn) OVERRIDE { |
| - base::AutoLock auto_lock(lock_); |
| - |
| - for (GLsizei ii = 0; ii < n; ++ii) { |
| - id_allocator_.FreeID(ids[ii]); |
| - } |
| - |
| + // Possibly may do a synchronous ipc, so can't hold a lock across it on |
| + // pepper: http://crbug.com/418651 |
| (gl_impl->*delete_fn)(n, ids); |
| // We need to ensure that the delete call is evaluated on the service side |
| // before any other contexts issue commands using these client ids. |
| // TODO(vmiura): Can remove this by virtualizing internal ids, however |
| // this code only affects PPAPI for now. |
| gl_impl->helper()->CommandBufferHelper::Flush(); |
| + |
| + base::AutoLock auto_lock(lock_); |
| + |
| + for (GLsizei ii = 0; ii < n; ++ii) { |
| + id_allocator_.FreeID(ids[ii]); |
| + } |
|
piman
2014/10/02 21:44:02
I think this change would cause a potential race i
Peng
2014/12/05 18:16:42
I think delete_fn and Flush() do not use sync IPC
piman
2014/12/05 20:51:49
delete_fn will use a sync IPC in some cases, e.g.
|
| + |
| return true; |
| } |