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

Unified Diff: cc/raster/tile_task_worker_pool.cc

Issue 1449133002: TaskGraphRunner refactor (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: feedback Created 5 years, 1 month 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/raster/task_graph_work_queue.cc ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/tile_task_worker_pool.cc
diff --git a/cc/raster/tile_task_worker_pool.cc b/cc/raster/tile_task_worker_pool.cc
index e1e6ac38616ffa3ecdbb88253ccc2a6d2a4db187..0ad998c83d65692139fc8d7af4a28791ae31bb7d 100644
--- a/cc/raster/tile_task_worker_pool.cc
+++ b/cc/raster/tile_task_worker_pool.cc
@@ -61,11 +61,9 @@ size_t TileTaskWorkerPool::kTaskSetFinishedTaskPriorityBase = 1u;
// |kTaskSetFinishedTaskPriorityBase + kNumberOfTaskSets|.
size_t TileTaskWorkerPool::kTileTaskPriorityBase = 10u;
-TileTaskWorkerPool::TileTaskWorkerPool() {
-}
+TileTaskWorkerPool::TileTaskWorkerPool() {}
-TileTaskWorkerPool::~TileTaskWorkerPool() {
-}
+TileTaskWorkerPool::~TileTaskWorkerPool() {}
// static
scoped_refptr<TileTask> TileTaskWorkerPool::CreateTaskSetFinishedTask(
@@ -99,8 +97,9 @@ void TileTaskWorkerPool::InsertNodeForTask(TaskGraph* graph,
size_t priority,
size_t dependencies) {
DCHECK(std::find_if(graph->nodes.begin(), graph->nodes.end(),
- TaskGraph::Node::TaskComparator(task)) ==
- graph->nodes.end());
+ [task](const TaskGraph::Node& node) {
+ return node.task == task;
+ }) == graph->nodes.end());
graph->nodes.push_back(TaskGraph::Node(task, priority, dependencies));
}
@@ -126,7 +125,9 @@ void TileTaskWorkerPool::InsertNodesForRasterTask(
// Add decode task if it doesn't already exists in graph.
TaskGraph::Node::Vector::iterator decode_it =
std::find_if(graph->nodes.begin(), graph->nodes.end(),
- TaskGraph::Node::TaskComparator(decode_task));
+ [decode_task](const TaskGraph::Node& node) {
+ return node.task == decode_task;
+ });
if (decode_it == graph->nodes.end())
InsertNodeForTask(graph, decode_task, priority, 0u);
« no previous file with comments | « cc/raster/task_graph_work_queue.cc ('k') | cc/raster/tile_task_worker_pool_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698