| 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 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 207 | 207 |
| 208 graph_.edges.push_back( | 208 graph_.edges.push_back( |
| 209 TaskGraph::Edge(task, new_task_set_finished_tasks[task_set].get())); | 209 TaskGraph::Edge(task, new_task_set_finished_tasks[task_set].get())); |
| 210 } | 210 } |
| 211 | 211 |
| 212 InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++); | 212 InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++); |
| 213 } | 213 } |
| 214 | 214 |
| 215 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { | 215 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { |
| 216 InsertNodeForTask(&graph_, new_task_set_finished_tasks[task_set].get(), | 216 InsertNodeForTask(&graph_, new_task_set_finished_tasks[task_set].get(), |
| 217 kTaskSetFinishedTaskPriority, task_count[task_set]); | 217 kTaskSetFinishedTaskPriorityBase + task_set, |
| 218 task_count[task_set]); |
| 218 } | 219 } |
| 219 | 220 |
| 220 ScheduleTasksOnOriginThread(this, &graph_); | 221 ScheduleTasksOnOriginThread(this, &graph_); |
| 221 task_graph_runner_->ScheduleTasks(namespace_token_, &graph_); | 222 task_graph_runner_->ScheduleTasks(namespace_token_, &graph_); |
| 222 | 223 |
| 223 std::copy(new_task_set_finished_tasks, | 224 std::copy(new_task_set_finished_tasks, |
| 224 new_task_set_finished_tasks + kNumberOfTaskSets, | 225 new_task_set_finished_tasks + kNumberOfTaskSets, |
| 225 task_set_finished_tasks_); | 226 task_set_finished_tasks_); |
| 226 | 227 |
| 227 resource_pool_->ReduceResourceUsage(); | 228 resource_pool_->ReduceResourceUsage(); |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 490 resource_pool_->total_memory_usage_bytes()); | 491 resource_pool_->total_memory_usage_bytes()); |
| 491 staging_state->SetInteger("pending_copy_count", | 492 staging_state->SetInteger("pending_copy_count", |
| 492 resource_pool_->total_resource_count() - | 493 resource_pool_->total_resource_count() - |
| 493 resource_pool_->acquired_resource_count()); | 494 resource_pool_->acquired_resource_count()); |
| 494 staging_state->SetInteger("bytes_pending_copy", | 495 staging_state->SetInteger("bytes_pending_copy", |
| 495 resource_pool_->total_memory_usage_bytes() - | 496 resource_pool_->total_memory_usage_bytes() - |
| 496 resource_pool_->acquired_memory_usage_bytes()); | 497 resource_pool_->acquired_memory_usage_bytes()); |
| 497 } | 498 } |
| 498 | 499 |
| 499 } // namespace cc | 500 } // namespace cc |
| OLD | NEW |