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

Unified Diff: cc/tiles/tile_manager.cc

Issue 1796423002: Handle out of order tile priorities when building graph (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/tiles/tile_manager.cc
diff --git a/cc/tiles/tile_manager.cc b/cc/tiles/tile_manager.cc
index fe9933edafd98bd619e0309c93815d09119de034..e86e9574e9975ce3f459b42364bb70f0839fd16b 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -195,11 +195,15 @@ void InsertNodesForRasterTask(TaskGraph* graph,
return node.task == decode_task;
});
- // Tasks are inserted in priority order, so existing decode tasks should
- // already be FOREGROUND if this is a high priority task.
- DCHECK(decode_it == graph->nodes.end() || !high_priority ||
- static_cast<uint16_t>(TASK_CATEGORY_FOREGROUND) ==
- decode_it->category);
+ // In rare circumstances, a low priority task may come in before a high
+ // priority task. In these cases, upgrade any low-priority dependencies of
+ // the current task.
+ // TODO(ericrk): Task iterators should be updated to avoid this.
+ // crbug.com/594851
+ if (decode_it != graph->nodes.end() && high_priority &&
+ decode_it->category != static_cast<uint16_t>(decode_task_category)) {
vmpstr 2016/03/21 19:44:50 Why is static_cast required here? (and not below?)
ericrk 2016/03/24 17:56:04 I guess it's not... I must not have checked :D
+ decode_it->category = decode_task_category;
+ }
if (decode_it == graph->nodes.end()) {
InsertNodeForTask(graph, decode_task, decode_task_category, priority, 0u);
@@ -768,8 +772,12 @@ void TileManager::ScheduleTasks(
all_count++;
graph_.edges.push_back(TaskGraph::Edge(task, all_done_task.get()));
+ // A tile is high priority if it is either blocking future compositing
+ // (requierd for draw or required for activation), or if it has a priority
vmpstr 2016/03/21 19:44:51 s/requierd/required/
ericrk 2016/03/24 17:56:04 Done.
+ // bin of NOW for another reason (low resolution tiles).
bool high_priority =
- tile->required_for_draw() || tile->required_for_activation();
+ tile->required_for_draw() || tile->required_for_activation() ||
+ prioritized_tile.priority().priority_bin == TilePriority::NOW;
InsertNodesForRasterTask(&graph_, task, task->dependencies(), priority++,
use_gpu_rasterization_, high_priority);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698