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

Unified Diff: cc/resources/tile_task_worker_pool.cc

Issue 943813002: cc: Add TaskGraphRunner sub-namespaces with task concurrency limits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
Index: cc/resources/tile_task_worker_pool.cc
diff --git a/cc/resources/tile_task_worker_pool.cc b/cc/resources/tile_task_worker_pool.cc
index 277538648ba9b22fb0e56cceaf4ea716a9985052..fa2b350110d4a26520586a2d269c32a737c171f5 100644
--- a/cc/resources/tile_task_worker_pool.cc
+++ b/cc/resources/tile_task_worker_pool.cc
@@ -163,11 +163,14 @@ void TileTaskWorkerPool::ScheduleTasksOnOriginThread(TileTaskClient* client,
void TileTaskWorkerPool::InsertNodeForTask(TaskGraph* graph,
TileTask* task,
unsigned priority,
- size_t dependencies) {
+ size_t dependencies,
+ int sub_namespace,
+ int max_concurrent_tasks) {
DCHECK(std::find_if(graph->nodes.begin(), graph->nodes.end(),
TaskGraph::Node::TaskComparator(task)) ==
graph->nodes.end());
- graph->nodes.push_back(TaskGraph::Node(task, priority, dependencies));
+ graph->nodes.push_back(TaskGraph::Node(task, priority, dependencies,
+ sub_namespace, max_concurrent_tasks));
}
// static
@@ -175,7 +178,9 @@ void TileTaskWorkerPool::InsertNodesForRasterTask(
TaskGraph* graph,
RasterTask* raster_task,
const ImageDecodeTask::Vector& decode_tasks,
- unsigned priority) {
+ unsigned priority,
+ int sub_namespace,
+ int max_concurrent_tasks) {
size_t dependencies = 0u;
// Insert image decode tasks.
@@ -194,12 +199,14 @@ void TileTaskWorkerPool::InsertNodesForRasterTask(
std::find_if(graph->nodes.begin(), graph->nodes.end(),
TaskGraph::Node::TaskComparator(decode_task));
if (decode_it == graph->nodes.end())
- InsertNodeForTask(graph, decode_task, priority, 0u);
+ InsertNodeForTask(graph, decode_task, priority, 0u, kDefaultSubNamespace,
danakj 2015/02/23 18:45:01 when using the defaults can you leave a comment wh
+ kDefaultMaxConcurrentTasks);
graph->edges.push_back(TaskGraph::Edge(decode_task, raster_task));
}
- InsertNodeForTask(graph, raster_task, priority, dependencies);
+ InsertNodeForTask(graph, raster_task, priority, dependencies, sub_namespace,
+ max_concurrent_tasks);
}
static bool IsSupportedPlaybackToMemoryFormat(ResourceFormat format) {

Powered by Google App Engine
This is Rietveld 408576698