OLD | NEW |
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/resources/worker_pool.h" | 5 #include "cc/resources/worker_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
11 #include "base/containers/hash_tables.h" | 11 #include "base/containers/hash_tables.h" |
12 #include "base/debug/trace_event.h" | 12 #include "base/debug/trace_event.h" |
13 #include "base/strings/stringprintf.h" | 13 #include "base/strings/stringprintf.h" |
| 14 #include "base/synchronization/condition_variable.h" |
14 #include "base/threading/simple_thread.h" | 15 #include "base/threading/simple_thread.h" |
15 #include "base/threading/thread_restrictions.h" | 16 #include "base/threading/thread_restrictions.h" |
16 #include "cc/base/scoped_ptr_deque.h" | 17 #include "cc/base/scoped_ptr_deque.h" |
17 | 18 |
18 namespace cc { | 19 namespace cc { |
19 | 20 |
20 namespace internal { | 21 namespace internal { |
21 | 22 |
22 WorkerPoolTask::WorkerPoolTask() | 23 WorkerPoolTask::WorkerPoolTask() |
23 : did_schedule_(false), | 24 : did_schedule_(false), |
(...skipping 398 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
422 void WorkerPool::SetTaskGraph(TaskGraph* graph) { | 423 void WorkerPool::SetTaskGraph(TaskGraph* graph) { |
423 TRACE_EVENT1("cc", "WorkerPool::SetTaskGraph", | 424 TRACE_EVENT1("cc", "WorkerPool::SetTaskGraph", |
424 "num_tasks", graph->size()); | 425 "num_tasks", graph->size()); |
425 | 426 |
426 DCHECK(!in_dispatch_completion_callbacks_); | 427 DCHECK(!in_dispatch_completion_callbacks_); |
427 | 428 |
428 inner_->SetTaskGraph(graph); | 429 inner_->SetTaskGraph(graph); |
429 } | 430 } |
430 | 431 |
431 } // namespace cc | 432 } // namespace cc |
OLD | NEW |