Chromium Code Reviews| Index: content/common/gpu/client/command_buffer_proxy_impl.cc |
| diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc |
| index 49cb0a3ea35b1d44f1ffb06669d532acb81d7656..a2387ad54edb50d959fd3f4f7647be2cc38ddf12 100644 |
| --- a/content/common/gpu/client/command_buffer_proxy_impl.cc |
| +++ b/content/common/gpu/client/command_buffer_proxy_impl.cc |
| @@ -149,9 +149,12 @@ bool CommandBufferProxyImpl::Initialize() { |
| return false; |
| bool result; |
| - if (!Send(new GpuCommandBufferMsg_Initialize(route_id_, handle, &result))) { |
| - LOG(ERROR) << "Could not send GpuCommandBufferMsg_Initialize."; |
| - return false; |
| + { |
| + base::ThreadRestrictions::ScopedAllowWait allow_wait; |
| + if (!Send(new GpuCommandBufferMsg_Initialize(route_id_, handle, &result))) { |
|
boliu
2013/03/01 00:19:12
handler does not need DELAYED_RESPONSE, so should
|
| + LOG(ERROR) << "Could not send GpuCommandBufferMsg_Initialize."; |
| + return false; |
| + } |
| } |
| if (!result) { |
| @@ -166,8 +169,12 @@ gpu::CommandBuffer::State CommandBufferProxyImpl::GetState() { |
| // Send will flag state with lost context if IPC fails. |
| if (last_state_.error == gpu::error::kNoError) { |
| gpu::CommandBuffer::State state; |
| - if (Send(new GpuCommandBufferMsg_GetState(route_id_, &state))) |
| - OnUpdateState(state); |
| + { |
| + // Seems fine. |
| + base::ThreadRestrictions::ScopedAllowWait allow_wait; |
| + if (Send(new GpuCommandBufferMsg_GetState(route_id_, &state))) |
|
boliu
2013/03/01 00:19:12
Again doesn't really need DELAYED_RESPONSE except
|
| + OnUpdateState(state); |
| + } |
| } |
| TryUpdateState(); |
| @@ -213,9 +220,12 @@ gpu::CommandBuffer::State CommandBufferProxyImpl::FlushSync( |
| // Send will flag state with lost context if IPC fails. |
| if (last_state_.error == gpu::error::kNoError) { |
| gpu::CommandBuffer::State state; |
| - if (Send(new GpuCommandBufferMsg_GetStateFast(route_id_, |
| - &state))) |
| - OnUpdateState(state); |
| + { |
| + base::ThreadRestrictions::ScopedAllowWait allow_wait; |
| + if (Send(new GpuCommandBufferMsg_GetStateFast(route_id_, |
|
boliu
2013/03/01 00:19:12
I changed handler to not use DELAYED_RESPONSE
|
| + &state))) |
| + OnUpdateState(state); |
| + } |
| } |
| TryUpdateState(); |
| } |
| @@ -227,7 +237,11 @@ void CommandBufferProxyImpl::SetGetBuffer(int32 shm_id) { |
| if (last_state_.error != gpu::error::kNoError) |
| return; |
| - Send(new GpuCommandBufferMsg_SetGetBuffer(route_id_, shm_id)); |
| + { |
| + // Seems safe, direct reply. |
| + base::ThreadRestrictions::ScopedAllowWait allow_wait; |
| + Send(new GpuCommandBufferMsg_SetGetBuffer(route_id_, shm_id)); |
|
boliu
2013/03/01 00:19:12
Changed handler to not use DELAYED_RESPONSE
|
| + } |
| last_put_offset_ = -1; |
| } |