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 <algorithm> | 7 #include <algorithm> |
8 #include <limits> | 8 #include <limits> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 size_t kTileTaskPriorityBase = 10u; | 164 size_t kTileTaskPriorityBase = 10u; |
165 | 165 |
166 void InsertNodeForTask(TaskGraph* graph, | 166 void InsertNodeForTask(TaskGraph* graph, |
167 TileTask* task, | 167 TileTask* task, |
168 size_t priority, | 168 size_t priority, |
169 size_t dependencies) { | 169 size_t dependencies) { |
170 DCHECK(std::find_if(graph->nodes.begin(), graph->nodes.end(), | 170 DCHECK(std::find_if(graph->nodes.begin(), graph->nodes.end(), |
171 [task](const TaskGraph::Node& node) { | 171 [task](const TaskGraph::Node& node) { |
172 return node.task == task; | 172 return node.task == task; |
173 }) == graph->nodes.end()); | 173 }) == graph->nodes.end()); |
174 | 174 graph->nodes.push_back(TaskGraph::Node(task, priority, dependencies)); |
175 // TODO(ericrk): Add in more logic around category selection. | |
176 graph->nodes.push_back( | |
177 TaskGraph::Node(task, 0 /* category */, priority, dependencies)); | |
178 } | 175 } |
179 | 176 |
180 void InsertNodesForRasterTask(TaskGraph* graph, | 177 void InsertNodesForRasterTask(TaskGraph* graph, |
181 RasterTask* raster_task, | 178 RasterTask* raster_task, |
182 const ImageDecodeTask::Vector& decode_tasks, | 179 const ImageDecodeTask::Vector& decode_tasks, |
183 size_t priority) { | 180 size_t priority) { |
184 size_t dependencies = 0u; | 181 size_t dependencies = 0u; |
185 | 182 |
186 // Insert image decode tasks. | 183 // Insert image decode tasks. |
187 for (ImageDecodeTask::Vector::const_iterator it = decode_tasks.begin(); | 184 for (ImageDecodeTask::Vector::const_iterator it = decode_tasks.begin(); |
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1167 void TileManager::Signals::reset() { | 1164 void TileManager::Signals::reset() { |
1168 ready_to_activate = false; | 1165 ready_to_activate = false; |
1169 did_notify_ready_to_activate = false; | 1166 did_notify_ready_to_activate = false; |
1170 ready_to_draw = false; | 1167 ready_to_draw = false; |
1171 did_notify_ready_to_draw = false; | 1168 did_notify_ready_to_draw = false; |
1172 all_tile_tasks_completed = false; | 1169 all_tile_tasks_completed = false; |
1173 did_notify_all_tile_tasks_completed = false; | 1170 did_notify_all_tile_tasks_completed = false; |
1174 } | 1171 } |
1175 | 1172 |
1176 } // namespace cc | 1173 } // namespace cc |
OLD | NEW |