Chromium Code Reviews

Unified Diff: cc/raster/task_graph_runner_perftest.cc

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: cc/raster/task_graph_runner_perftest.cc
diff --git a/cc/raster/task_graph_runner_perftest.cc b/cc/raster/task_graph_runner_perftest.cc
index a825f1b373ab7fd3d33d318462f0911857041908..6b9b309443e40340bfa1687dff4a69a8c86ef923 100644
--- a/cc/raster/task_graph_runner_perftest.cc
+++ b/cc/raster/task_graph_runner_perftest.cc
@@ -272,6 +272,12 @@ class TaskGraphRunnerPerfTest : public testing::Test {
DCHECK(completed_tasks->empty());
task_graph_runner_->CollectCompletedTasks(namespace_token_,
completed_tasks);
+ for (auto task : *completed_tasks) {
vmpstr 2016/05/18 19:08:34 nit: auto* task
prashant.n 2016/05/19 14:32:30 It is scoped_refptr class object, so it would not
ericrk 2016/05/19 23:19:37 In that case, would auto& be more appropriate - th
prashant.n 2016/05/20 11:48:52 Now I understood why vmpstr added comment. Thank y
+ // Instead of calling DidComplete(), call Reset() as same task would be
+ // reused as if new.
+ task->state().Reset();
+ }
+
return completed_tasks->size();
}

Powered by Google App Engine