| 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/resources/zero_copy_tile_task_worker_pool.h" | 5 #include "cc/resources/zero_copy_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 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { | 121 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { |
| 122 if (!item.task_sets[task_set]) | 122 if (!item.task_sets[task_set]) |
| 123 continue; | 123 continue; |
| 124 | 124 |
| 125 ++task_count[task_set]; | 125 ++task_count[task_set]; |
| 126 | 126 |
| 127 graph_.edges.push_back( | 127 graph_.edges.push_back( |
| 128 TaskGraph::Edge(task, new_task_set_finished_tasks[task_set].get())); | 128 TaskGraph::Edge(task, new_task_set_finished_tasks[task_set].get())); |
| 129 } | 129 } |
| 130 | 130 |
| 131 InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++); | 131 InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++, |
| 132 kDefaultSubNamespace, kDefaultMaxConcurrentTasks); |
| 132 } | 133 } |
| 133 | 134 |
| 134 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { | 135 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) { |
| 135 InsertNodeForTask(&graph_, new_task_set_finished_tasks[task_set].get(), | 136 InsertNodeForTask(&graph_, new_task_set_finished_tasks[task_set].get(), |
| 136 kTaskSetFinishedTaskPriorityBase + task_set, | 137 kTaskSetFinishedTaskPriorityBase + task_set, |
| 137 task_count[task_set]); | 138 task_count[task_set], kDefaultSubNamespace, |
| 139 kDefaultMaxConcurrentTasks); |
| 138 } | 140 } |
| 139 | 141 |
| 140 ScheduleTasksOnOriginThread(this, &graph_); | 142 ScheduleTasksOnOriginThread(this, &graph_); |
| 141 task_graph_runner_->ScheduleTasks(namespace_token_, &graph_); | 143 task_graph_runner_->ScheduleTasks(namespace_token_, &graph_); |
| 142 | 144 |
| 143 std::copy(new_task_set_finished_tasks, | 145 std::copy(new_task_set_finished_tasks, |
| 144 new_task_set_finished_tasks + kNumberOfTaskSets, | 146 new_task_set_finished_tasks + kNumberOfTaskSets, |
| 145 task_set_finished_tasks_); | 147 task_set_finished_tasks_); |
| 146 | 148 |
| 147 TRACE_EVENT_ASYNC_STEP_INTO1("cc", "ScheduledTasks", this, "running", "state", | 149 TRACE_EVENT_ASYNC_STEP_INTO1("cc", "ScheduledTasks", this, "running", "state", |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 202 new base::trace_event::TracedValue(); | 204 new base::trace_event::TracedValue(); |
| 203 | 205 |
| 204 state->BeginArray("tasks_pending"); | 206 state->BeginArray("tasks_pending"); |
| 205 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) | 207 for (TaskSet task_set = 0; task_set < kNumberOfTaskSets; ++task_set) |
| 206 state->AppendBoolean(tasks_pending_[task_set]); | 208 state->AppendBoolean(tasks_pending_[task_set]); |
| 207 state->EndArray(); | 209 state->EndArray(); |
| 208 return state; | 210 return state; |
| 209 } | 211 } |
| 210 | 212 |
| 211 } // namespace cc | 213 } // namespace cc |
| OLD | NEW |