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

Unified Diff: cc/raster/task_graph_runner_perftest.cc

Issue 1854723002: cc: Simplify task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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/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 f86bae571bfb4c344f9e871a77db7bf11258d39e..9483fdaadeb67323801a00909079aae190a732a0 100644
--- a/cc/raster/task_graph_runner_perftest.cc
+++ b/cc/raster/task_graph_runner_perftest.cc
@@ -23,13 +23,15 @@ static const int kTimeLimitMillis = 2000;
static const int kWarmupRuns = 5;
static const int kTimeCheckInterval = 10;
-class PerfTaskImpl : public Task {
+class PerfTaskImpl : public DependencyTask {
public:
typedef std::vector<scoped_refptr<PerfTaskImpl>> Vector;
PerfTaskImpl() {}
- // Overridden from Task:
+ // Overridden from DependencyTask:
+ void ScheduleOnOriginThread(DependencyTaskClient* client) override {}
+ void CompleteOnOriginThread(DependencyTaskClient* client) override {}
void RunOnWorkerThread() override {}
void Reset() { did_run_ = false; }
@@ -97,7 +99,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
// Avoid unnecessary heap allocations by reusing the same graph and
// completed tasks vector.
TaskGraph graph;
- Task::Vector completed_tasks;
+ DependencyTask::Vector completed_tasks;
timer_.Reset();
do {
@@ -139,7 +141,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
// Avoid unnecessary heap allocations by reusing the same graph and
// completed tasks vector.
TaskGraph graph;
- Task::Vector completed_tasks;
+ DependencyTask::Vector completed_tasks;
size_t count = 0;
timer_.Reset();
@@ -182,7 +184,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
// Avoid unnecessary heap allocations by reusing the same graph and
// completed tasks vector.
TaskGraph graph;
- Task::Vector completed_tasks;
+ DependencyTask::Vector completed_tasks;
timer_.Reset();
do {
@@ -263,7 +265,7 @@ class TaskGraphRunnerPerfTest : public testing::Test {
}
}
- size_t CollectCompletedTasks(Task::Vector* completed_tasks) {
+ size_t CollectCompletedTasks(DependencyTask::Vector* completed_tasks) {
DCHECK(completed_tasks->empty());
task_graph_runner_->CollectCompletedTasks(namespace_token_,
completed_tasks);

Powered by Google App Engine
This is Rietveld 408576698