Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(137)

Side by Side Diff: cc/tiles/tile_manager.cc

Issue 1489233003: TaskGraphRunner Group support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/test/task_graph_runner_test_template.cc ('k') | content/renderer/raster_worker_pool.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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 graph->nodes.push_back(TaskGraph::Node(task, priority, dependencies)); 174
175 // TODO(ericrk): Add in more logic around category selection.
176 graph->nodes.push_back(
177 TaskGraph::Node(task, 0 /* category */, priority, dependencies));
175 } 178 }
176 179
177 void InsertNodesForRasterTask(TaskGraph* graph, 180 void InsertNodesForRasterTask(TaskGraph* graph,
178 RasterTask* raster_task, 181 RasterTask* raster_task,
179 const ImageDecodeTask::Vector& decode_tasks, 182 const ImageDecodeTask::Vector& decode_tasks,
180 size_t priority) { 183 size_t priority) {
181 size_t dependencies = 0u; 184 size_t dependencies = 0u;
182 185
183 // Insert image decode tasks. 186 // Insert image decode tasks.
184 for (ImageDecodeTask::Vector::const_iterator it = decode_tasks.begin(); 187 for (ImageDecodeTask::Vector::const_iterator it = decode_tasks.begin();
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1164 void TileManager::Signals::reset() { 1167 void TileManager::Signals::reset() {
1165 ready_to_activate = false; 1168 ready_to_activate = false;
1166 did_notify_ready_to_activate = false; 1169 did_notify_ready_to_activate = false;
1167 ready_to_draw = false; 1170 ready_to_draw = false;
1168 did_notify_ready_to_draw = false; 1171 did_notify_ready_to_draw = false;
1169 all_tile_tasks_completed = false; 1172 all_tile_tasks_completed = false;
1170 did_notify_all_tile_tasks_completed = false; 1173 did_notify_all_tile_tasks_completed = false;
1171 } 1174 }
1172 1175
1173 } // namespace cc 1176 } // namespace cc
OLDNEW
« no previous file with comments | « cc/test/task_graph_runner_test_template.cc ('k') | content/renderer/raster_worker_pool.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698