| 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 |
| 170 if (tasks_pending_.none()) | 177 if (tasks_pending_.none()) |
| 171 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this); | 178 TRACE_EVENT_ASYNC_BEGIN0("cc", "ScheduledTasks", this); |
| 172 | 179 |
| 173 // Mark all task sets as pending. | 180 // Mark all task sets as pending. |
| 174 tasks_pending_.set(); | 181 tasks_pending_.set(); |
| 175 | 182 |
| 176 unsigned priority = kTileTaskPriorityBase; | 183 unsigned priority = kTileTaskPriorityBase; |
| 177 | 184 |
| 178 graph_.Reset(); | 185 graph_.Reset(); |
| 179 | 186 |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 resource_pool_->total_memory_usage_bytes()); | 498 resource_pool_->total_memory_usage_bytes()); |
| 492 staging_state->SetInteger("pending_copy_count", | 499 staging_state->SetInteger("pending_copy_count", |
| 493 resource_pool_->total_resource_count() - | 500 resource_pool_->total_resource_count() - |
| 494 resource_pool_->acquired_resource_count()); | 501 resource_pool_->acquired_resource_count()); |
| 495 staging_state->SetInteger("bytes_pending_copy", | 502 staging_state->SetInteger("bytes_pending_copy", |
| 496 resource_pool_->total_memory_usage_bytes() - | 503 resource_pool_->total_memory_usage_bytes() - |
| 497 resource_pool_->acquired_memory_usage_bytes()); | 504 resource_pool_->acquired_memory_usage_bytes()); |
| 498 } | 505 } |
| 499 | 506 |
| 500 } // namespace cc | 507 } // namespace cc |
| OLD | NEW |