Chromium Code Reviews| Index: content/browser/gpu/gpu_process_host.cc |
| diff --git a/content/browser/gpu/gpu_process_host.cc b/content/browser/gpu/gpu_process_host.cc |
| index ad709972b18da004951e06a9f27ffb2321944633..6ab7994ed981a4cc980d13de0c8bc8db2d0603b2 100644 |
| --- a/content/browser/gpu/gpu_process_host.cc |
| +++ b/content/browser/gpu/gpu_process_host.cc |
| @@ -646,7 +646,9 @@ void GpuProcessHost::CreateViewCommandBuffer( |
| surface_refs_.insert(std::make_pair(surface_id, |
| GpuSurfaceTracker::GetInstance()->GetSurfaceRefForSurface(surface_id))); |
| } else { |
| - callback.Run(false); |
| + // Could distinguish here between compositing_surface being NULL |
| + // and Send failing, if desired. |
|
piman
2014/07/11 23:20:09
Really, we should assert and fix it upstream
|
| + callback.Run(CREATE_CMDBUF_FAILED_AND_CHANNEL_LOST); |
| } |
| } |
| @@ -754,7 +756,7 @@ void GpuProcessHost::OnCommandBufferCreated(bool succeeded) { |
| CreateCommandBufferCallback callback = |
| create_command_buffer_requests_.front(); |
| create_command_buffer_requests_.pop(); |
| - callback.Run(succeeded); |
| + callback.Run(succeeded ? CREATE_CMDBUF_SUCCEEDED : CREATE_CMDBUF_FAILED); |
|
piman
2014/07/11 23:20:09
ideally we'd pass a CreateCommandBufferResult back
Ken Russell (switch to Gerrit)
2014/07/12 00:44:52
Thanks, that sounds cleaner. I've implemented this
|
| } |
| void GpuProcessHost::OnDestroyCommandBuffer(int32 surface_id) { |
| @@ -1061,7 +1063,7 @@ void GpuProcessHost::SendOutstandingReplies() { |
| CreateCommandBufferCallback callback = |
| create_command_buffer_requests_.front(); |
| create_command_buffer_requests_.pop(); |
| - callback.Run(false); |
| + callback.Run(CREATE_CMDBUF_FAILED_AND_CHANNEL_LOST); |
| } |
| } |