Chromium Code Reviews| Index: gpu/ipc/service/gpu_command_buffer_stub.cc |
| diff --git a/gpu/ipc/service/gpu_command_buffer_stub.cc b/gpu/ipc/service/gpu_command_buffer_stub.cc |
| index 64c3eef0e1a1afe631705497d68c487ba14a5c36..81e10fc6c28ba454b176acde8cc713e350250f27 100644 |
| --- a/gpu/ipc/service/gpu_command_buffer_stub.cc |
| +++ b/gpu/ipc/service/gpu_command_buffer_stub.cc |
| @@ -304,8 +304,10 @@ void GpuCommandBufferStub::PerformWork() { |
| if (executor_) { |
| uint32_t current_unprocessed_num = |
| channel()->gpu_channel_manager()->GetUnprocessedOrderNum(); |
| - // We're idle when no messages were processed or scheduled. |
| + // We're idle when no messages were processed or scheduled, or if the |
| + // executor is descheduled. |
| bool is_idle = (previous_processed_num_ == current_unprocessed_num); |
| + is_idle |= !executor_->scheduled(); |
|
piman
2016/06/10 21:52:27
Trying to think a bit more about this...
We want
erikchen
2016/06/22 19:23:07
I think that your proposed solution still has edge
piman
2016/06/22 21:47:41
Yeah, I guess we should separate "polling work", w
|
| if (!is_idle && !last_idle_time_.is_null()) { |
| base::TimeDelta time_since_idle = |
| base::TimeTicks::Now() - last_idle_time_; |