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

Unified Diff: cc/tiles/tile_manager.cc

Issue 1832573004: Gpu Image Decode Controller (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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 | « cc/tiles/software_image_decode_controller.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | 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 2af48b5fcf490ad6517bf2b493e9586a9f54efd9..e2f362d4ed457eb0bd8eaea353a57514ed3933b2 100644
--- a/cc/tiles/tile_manager.cc
+++ b/cc/tiles/tile_manager.cc
@@ -155,6 +155,23 @@ void InsertNodeForTask(TaskGraph* graph,
TaskGraph::Node(task, category, priority, dependencies));
}
+void InsertNodeForDecodeTask(TaskGraph* graph,
+ ImageDecodeTask* task,
+ uint16_t category,
+ uint16_t priority) {
+ uint32_t dependency_count = 0u;
+ auto* dependency = task->dependency().get();
+ if (dependency && !dependency->HasCompleted()) {
+ InsertNodeForDecodeTask(graph, dependency, category, priority);
+ graph->edges.push_back(TaskGraph::Edge(dependency, task));
+ dependency_count = 1u;
+ }
+ InsertNodeForTask(graph, task, task->SupportsConcurrentExecution()
+ ? category
+ : TASK_CATEGORY_NONCONCURRENT_FOREGROUND,
+ priority, dependency_count);
+}
+
void InsertNodesForRasterTask(TaskGraph* graph,
RasterTask* raster_task,
const ImageDecodeTask::Vector& decode_tasks,
@@ -209,7 +226,8 @@ void InsertNodesForRasterTask(TaskGraph* graph,
}
if (decode_it == graph->nodes.end()) {
- InsertNodeForTask(graph, decode_task, decode_task_category, priority, 0u);
+ InsertNodeForDecodeTask(graph, decode_task, decode_task_category,
+ priority);
}
graph->edges.push_back(TaskGraph::Edge(decode_task, raster_task));
« no previous file with comments | « cc/tiles/software_image_decode_controller.cc ('k') | cc/trees/layer_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698