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

Unified Diff: cc/worker_pool.cc

Issue 12321140: cc: Check for cheap task completion sooner (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Call OnIdle instead. Created 7 years, 10 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: cc/worker_pool.cc
diff --git a/cc/worker_pool.cc b/cc/worker_pool.cc
index 5e7c681ca5bc7b2108ca78e218bd2663c7fc5a47..77e61398c27456a866ab471eff5e84b380b500ce 100644
--- a/cc/worker_pool.cc
+++ b/cc/worker_pool.cc
@@ -391,7 +391,10 @@ void WorkerPool::RunCheapTasks() {
pending_cheap_tasks_.take_front();
PostTask(task.Pass(), false);
}
+
run_cheap_tasks_pending_ = false;
+ if (base::subtle::Acquire_Load(&pending_task_count_) == 0)
+ OnIdle();
}
} // namespace cc
« 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