OLD | NEW |
---|---|
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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/tiles/tile_manager.h" | 5 #include "cc/tiles/tile_manager.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
152 }) == graph->nodes.end()); | 152 }) == graph->nodes.end()); |
153 graph->nodes.push_back( | 153 graph->nodes.push_back( |
154 TaskGraph::Node(task, category, priority, dependencies)); | 154 TaskGraph::Node(task, category, priority, dependencies)); |
155 } | 155 } |
156 | 156 |
157 void InsertNodeForDecodeTask(TaskGraph* graph, | 157 void InsertNodeForDecodeTask(TaskGraph* graph, |
158 TileTask* task, | 158 TileTask* task, |
159 uint16_t category, | 159 uint16_t category, |
160 uint16_t priority) { | 160 uint16_t priority) { |
161 uint32_t dependency_count = 0u; | 161 uint32_t dependency_count = 0u; |
162 if (task->dependencies().size()) { | 162 if (task->dependencies().size()) { |
prashant.n
2016/04/21 12:19:34
ericrk@, should we create a node for imageuploadta
| |
163 DCHECK_EQ(task->dependencies().size(), 1u); | 163 DCHECK_EQ(task->dependencies().size(), 1u); |
164 auto* dependency = task->dependencies()[0].get(); | 164 auto* dependency = task->dependencies()[0].get(); |
165 DCHECK(dependency) | |
166 << "Task |dependencies_| should hold valid dependencies."; | |
165 if (!dependency->HasCompleted()) { | 167 if (!dependency->HasCompleted()) { |
166 InsertNodeForDecodeTask(graph, dependency, category, priority); | 168 InsertNodeForDecodeTask(graph, dependency, category, priority); |
167 graph->edges.push_back(TaskGraph::Edge(dependency, task)); | 169 graph->edges.push_back(TaskGraph::Edge(dependency, task)); |
168 dependency_count = 1u; | 170 dependency_count = 1u; |
169 } | 171 } |
170 } | 172 } |
171 InsertNodeForTask(graph, task, task->supports_concurrent_execution() | 173 InsertNodeForTask(graph, task, task->supports_concurrent_execution() |
172 ? category | 174 ? category |
173 : TASK_CATEGORY_NONCONCURRENT_FOREGROUND, | 175 : TASK_CATEGORY_NONCONCURRENT_FOREGROUND, |
174 priority, dependency_count); | 176 priority, dependency_count); |
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1238 void TileManager::Signals::reset() { | 1240 void TileManager::Signals::reset() { |
1239 ready_to_activate = false; | 1241 ready_to_activate = false; |
1240 did_notify_ready_to_activate = false; | 1242 did_notify_ready_to_activate = false; |
1241 ready_to_draw = false; | 1243 ready_to_draw = false; |
1242 did_notify_ready_to_draw = false; | 1244 did_notify_ready_to_draw = false; |
1243 all_tile_tasks_completed = false; | 1245 all_tile_tasks_completed = false; |
1244 did_notify_all_tile_tasks_completed = false; | 1246 did_notify_all_tile_tasks_completed = false; |
1245 } | 1247 } |
1246 | 1248 |
1247 } // namespace cc | 1249 } // namespace cc |
OLD | NEW |