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

Side by Side 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, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "cc/worker_pool.h" 5 #include "cc/worker_pool.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 break; 384 break;
385 } 385 }
386 } 386 }
387 387
388 // Defer remaining tasks to worker threads. 388 // Defer remaining tasks to worker threads.
389 while (pending_cheap_tasks_.size()) { 389 while (pending_cheap_tasks_.size()) {
390 scoped_ptr<internal::WorkerPoolTask> task = 390 scoped_ptr<internal::WorkerPoolTask> task =
391 pending_cheap_tasks_.take_front(); 391 pending_cheap_tasks_.take_front();
392 PostTask(task.Pass(), false); 392 PostTask(task.Pass(), false);
393 } 393 }
394
394 run_cheap_tasks_pending_ = false; 395 run_cheap_tasks_pending_ = false;
396 if (base::subtle::Acquire_Load(&pending_task_count_) == 0)
397 OnIdle();
395 } 398 }
396 399
397 } // namespace cc 400 } // namespace cc
OLDNEW
« 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