| 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/bitmap_tile_task_worker_pool.h" | 5 #include "cc/resources/bitmap_tile_task_worker_pool.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/strings/stringprintf.h" | 9 #include "base/strings/stringprintf.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 121 | 121 |
| 122 graph_.edges.push_back( | 122 graph_.edges.push_back( |
| 123 TaskGraph::Edge(task, new_task_set_finished_tasks[task_set].get())); | 123 TaskGraph::Edge(task, new_task_set_finished_tasks[task_set].get())); |
| 124 } | 124 } |
| 125 | 125 |
| 126 InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++); | 126 InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++); |
| 127 } | 127 } |
| 128 | 128 |
| 129 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { | 129 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { |
| 130 InsertNodeForTask(&graph_, new_task_set_finished_tasks[task_set].get(), | 130 InsertNodeForTask(&graph_, new_task_set_finished_tasks[task_set].get(), |
| 131 kTaskSetFinishedTaskPriority, task_count[task_set]); | 131 kTaskSetFinishedTaskPriorityBase + task_set, |
| 132 task_count[task_set]); |
| 132 } | 133 } |
| 133 | 134 |
| 134 ScheduleTasksOnOriginThread(this, &graph_); | 135 ScheduleTasksOnOriginThread(this, &graph_); |
| 135 task_graph_runner_->ScheduleTasks(namespace_token_, &graph_); | 136 task_graph_runner_->ScheduleTasks(namespace_token_, &graph_); |
| 136 | 137 |
| 137 std::copy(new_task_set_finished_tasks, | 138 std::copy(new_task_set_finished_tasks, |
| 138 new_task_set_finished_tasks + kNumberOfTaskSets, | 139 new_task_set_finished_tasks + kNumberOfTaskSets, |
| 139 task_set_finished_tasks_); | 140 task_set_finished_tasks_); |
| 140 | 141 |
| 141 TRACE_EVENT_ASYNC_STEP_INTO1("cc", "ScheduledTasks", this, "running", "state", | 142 TRACE_EVENT_ASYNC_STEP_INTO1("cc", "ScheduledTasks", this, "running", "state", |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 196 new base::debug::TracedValue(); | 197 new base::debug::TracedValue(); |
| 197 | 198 |
| 198 state->BeginArray("tasks_pending"); | 199 state->BeginArray("tasks_pending"); |
| 199 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) | 200 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) |
| 200 state->AppendBoolean(tasks_pending_[task_set]); | 201 state->AppendBoolean(tasks_pending_[task_set]); |
| 201 state->EndArray(); | 202 state->EndArray(); |
| 202 return state; | 203 return state; |
| 203 } | 204 } |
| 204 | 205 |
| 205 } // namespace cc | 206 } // namespace cc |
| OLD | NEW |