summaryrefslogtreecommitdiffstats
path: root/cc/resources/worker_pool.cc
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 19:39:04 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-06-18 19:39:04 +0000
commit6814074b34c96090fce10643bcb227e8d166814e (patch)
treec3fc8e53357cd061043d3398c6faa0416b3f3e45 /cc/resources/worker_pool.cc
parentcfeb1df9f0534c5e6c7ace67432ab78a0f4fb8fe (diff)
downloadchromium_src-6814074b34c96090fce10643bcb227e8d166814e.zip
chromium_src-6814074b34c96090fce10643bcb227e8d166814e.tar.gz
chromium_src-6814074b34c96090fce10643bcb227e8d166814e.tar.bz2
cc: Fix to image decode in tile manager.
If an image decode task is canceled, we need to recreate it. Otherwise it will become a dependency that is never run, which prevents a raster task from running as well. BUG=250616 Review URL: https://chromiumcodereview.appspot.com/17298003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207063 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/worker_pool.cc')
-rw-r--r--cc/resources/worker_pool.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/cc/resources/worker_pool.cc b/cc/resources/worker_pool.cc
index 98237e2..09aa1aa 100644
--- a/cc/resources/worker_pool.cc
+++ b/cc/resources/worker_pool.cc
@@ -262,6 +262,11 @@ void WorkerPool::Inner::SetTaskGraph(TaskGraph* graph) {
running_tasks_.swap(new_running_tasks);
ready_to_run_tasks_.swap(new_ready_to_run_tasks);
+ // If |ready_to_run_tasks_| is empty, it means we either have
+ // running tasks, or we have no pending tasks.
+ DCHECK(!ready_to_run_tasks_.empty() ||
+ (pending_tasks_.empty() || !running_tasks_.empty()));
+
// If there is more work available, wake up worker thread.
if (!ready_to_run_tasks_.empty())
has_ready_to_run_tasks_cv_.Signal();