diff options
Diffstat (limited to 'content/common/gpu/gpu_channel.cc')
-rw-r--r-- | content/common/gpu/gpu_channel.cc | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc index c392a47..e26580a 100644 --- a/content/common/gpu/gpu_channel.cc +++ b/content/common/gpu/gpu_channel.cc @@ -884,18 +884,17 @@ void GpuChannel::OnDestroyCommandBuffer(int32 route_id) { TRACE_EVENT1("gpu", "GpuChannel::OnDestroyCommandBuffer", "route_id", route_id); - if (router_.ResolveRoute(route_id)) { - GpuCommandBufferStub* stub = stubs_.Lookup(route_id); - bool need_reschedule = (stub && !stub->IsScheduled()); - router_.RemoveRoute(route_id); - stubs_.Remove(route_id); - // In case the renderer is currently blocked waiting for a sync reply from - // the stub, we need to make sure to reschedule the GpuChannel here. - if (need_reschedule) { - // This stub won't get a chance to reschedule, so update the count - // now. - StubSchedulingChanged(true); - } + GpuCommandBufferStub* stub = stubs_.Lookup(route_id); + if (!stub) + return; + bool need_reschedule = (stub && !stub->IsScheduled()); + router_.RemoveRoute(route_id); + stubs_.Remove(route_id); + // In case the renderer is currently blocked waiting for a sync reply from the + // stub, we need to make sure to reschedule the GpuChannel here. + if (need_reschedule) { + // This stub won't get a chance to reschedule, so update the count now. + StubSchedulingChanged(true); } } |