Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(684)

Unified Diff: gpu/ipc/service/gpu_command_buffer_stub.cc

Issue 2056413003: Fix a bug in the implementation of DescheduleUntilFinishedCHROMIUM. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698