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..b5f1ef14427e2ab0997fdfb740690c7e3e642f85 100644 |
--- a/cc/raster/task_graph_runner_perftest.cc |
+++ b/cc/raster/task_graph_runner_perftest.cc |
@@ -272,6 +272,11 @@ class TaskGraphRunnerPerfTest : public testing::Test { |
DCHECK(completed_tasks->empty()); |
task_graph_runner_->CollectCompletedTasks(namespace_token_, |
completed_tasks); |
+ for (auto& task : *completed_tasks) { |
+ // Reset task state as same task would be reused as if new. |
+ task->state().Reset(); |
+ } |
+ |
return completed_tasks->size(); |
} |