| 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/base/worker_pool.h" | 5 #include "cc/base/worker_pool.h" |
| 6 | 6 |
| 7 #if defined(OS_ANDROID) | 7 #if defined(OS_ANDROID) |
| 8 // TODO(epenner): Move thread priorities to base. (crbug.com/170549) | 8 // TODO(epenner): Move thread priorities to base. (crbug.com/170549) |
| 9 #include <sys/resource.h> | 9 #include <sys/resource.h> |
| 10 #endif | 10 #endif |
| 11 | 11 |
| 12 #include <map> | 12 #include <map> |
| 13 | 13 |
| 14 #include "base/bind.h" | 14 #include "base/bind.h" |
| 15 #include "base/containers/hash_tables.h" |
| 15 #include "base/debug/trace_event.h" | 16 #include "base/debug/trace_event.h" |
| 16 #include "base/hash_tables.h" | |
| 17 #include "base/stringprintf.h" | 17 #include "base/stringprintf.h" |
| 18 #include "base/threading/simple_thread.h" | 18 #include "base/threading/simple_thread.h" |
| 19 #include "base/threading/thread_restrictions.h" | 19 #include "base/threading/thread_restrictions.h" |
| 20 #include "cc/base/scoped_ptr_deque.h" | 20 #include "cc/base/scoped_ptr_deque.h" |
| 21 #include "cc/base/scoped_ptr_hash_map.h" | 21 #include "cc/base/scoped_ptr_hash_map.h" |
| 22 | 22 |
| 23 #if defined(COMPILER_GCC) | 23 #if defined(COMPILER_GCC) |
| 24 namespace BASE_HASH_NAMESPACE { | 24 namespace BASE_HASH_NAMESPACE { |
| 25 template <> struct hash<cc::internal::WorkerPoolTask*> { | 25 template <> struct hash<cc::internal::WorkerPoolTask*> { |
| 26 size_t operator()(cc::internal::WorkerPoolTask* ptr) const { | 26 size_t operator()(cc::internal::WorkerPoolTask* ptr) const { |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 506 | 506 |
| 507 void WorkerPool::ScheduleTasks(internal::WorkerPoolTask* root) { | 507 void WorkerPool::ScheduleTasks(internal::WorkerPoolTask* root) { |
| 508 TRACE_EVENT0("cc", "WorkerPool::ScheduleTasks"); | 508 TRACE_EVENT0("cc", "WorkerPool::ScheduleTasks"); |
| 509 | 509 |
| 510 DCHECK(!in_dispatch_completion_callbacks_); | 510 DCHECK(!in_dispatch_completion_callbacks_); |
| 511 | 511 |
| 512 inner_->ScheduleTasks(root); | 512 inner_->ScheduleTasks(root); |
| 513 } | 513 } |
| 514 | 514 |
| 515 } // namespace cc | 515 } // namespace cc |
| OLD | NEW |