OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/one_copy_tile_task_worker_pool.h" | 5 #include "cc/resources/one_copy_tile_task_worker_pool.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 | 9 |
10 #include "base/strings/stringprintf.h" | 10 #include "base/strings/stringprintf.h" |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 } | 160 } |
161 | 161 |
162 TaskGraph empty; | 162 TaskGraph empty; |
163 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); | 163 task_graph_runner_->ScheduleTasks(namespace_token_, &empty); |
164 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); | 164 task_graph_runner_->WaitForTasksToFinishRunning(namespace_token_); |
165 } | 165 } |
166 | 166 |
167 void OneCopyTileTaskWorkerPool::ScheduleTasks(TileTaskQueue* queue) { | 167 void OneCopyTileTaskWorkerPool::ScheduleTasks(TileTaskQueue* queue) { |
168 TRACE_EVENT0("cc", "OneCopyTileTaskWorkerPool::ScheduleTasks"); | 168 TRACE_EVENT0("cc", "OneCopyTileTaskWorkerPool::ScheduleTasks"); |
169 | 169 |
170 #if DCHECK_IS_ON() | |
171 { | |
172 base::AutoLock lock(lock_); | |
173 DCHECK(!shutdown_); | |
174 } | |
175 #endif | |
176 | |
177 if (tasks_pending_.none()) | 170 if (tasks_pending_.none()) |
178 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this); | 171 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this); |
179 | 172 |
180 // Mark all task sets as pending. | 173 // Mark all task sets as pending. |
181 tasks_pending_.set(); | 174 tasks_pending_.set(); |
182 | 175 |
183 unsigned priority = kTileTaskPriorityBase; | 176 unsigned priority = kTileTaskPriorityBase; |
184 | 177 |
185 graph_.Reset(); | 178 graph_.Reset(); |
186 | 179 |
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
498 resource_pool_->total_memory_usage_bytes()); | 491 resource_pool_->total_memory_usage_bytes()); |
499 staging_state->SetInteger("pending_copy_count", | 492 staging_state->SetInteger("pending_copy_count", |
500 resource_pool_->total_resource_count() - | 493 resource_pool_->total_resource_count() - |
501 resource_pool_->acquired_resource_count()); | 494 resource_pool_->acquired_resource_count()); |
502 staging_state->SetInteger("bytes_pending_copy", | 495 staging_state->SetInteger("bytes_pending_copy", |
503 resource_pool_->total_memory_usage_bytes() - | 496 resource_pool_->total_memory_usage_bytes() - |
504 resource_pool_->acquired_memory_usage_bytes()); | 497 resource_pool_->acquired_memory_usage_bytes()); |
505 } | 498 } |
506 | 499 |
507 } // namespace cc | 500 } // namespace cc |
OLD | NEW |