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

Unified Diff: cc/test/fake_tile_manager.cc

Issue 1890903002: cc: Simplify Task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_tile_task_runner
Patch Set: feedback Created 4 years, 8 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/test/fake_tile_manager.cc
diff --git a/cc/test/fake_tile_manager.cc b/cc/test/fake_tile_manager.cc
index ebc0b70a51bfc3dcab4e50cce76172bccf2a0675..7397ae4a3e49e4d9361591dfb65cebaaa262823a 100644
--- a/cc/test/fake_tile_manager.cc
+++ b/cc/test/fake_tile_manager.cc
@@ -26,7 +26,7 @@ class FakeTileTaskRunnerImpl : public TileTaskRunner,
void Shutdown() override {}
void ScheduleTasks(TaskGraph* graph) override {
for (const auto& node : graph->nodes) {
- RasterTask* task = static_cast<RasterTask*>(node.task);
+ TileTask* task = static_cast<TileTask*>(node.task);
task->WillSchedule();
task->ScheduleOnOriginThread(this);
@@ -36,10 +36,9 @@ class FakeTileTaskRunnerImpl : public TileTaskRunner,
}
}
void CheckForCompletedTasks() override {
- for (RasterTask::Vector::iterator it = completed_tasks_.begin();
- it != completed_tasks_.end();
- ++it) {
- RasterTask* task = it->get();
+ for (TileTask::Vector::iterator it = completed_tasks_.begin();
+ it != completed_tasks_.end(); ++it) {
+ TileTask* task = it->get();
task->WillComplete();
task->CompleteOnOriginThread(this);
@@ -65,7 +64,7 @@ class FakeTileTaskRunnerImpl : public TileTaskRunner,
void ReleaseBufferForRaster(std::unique_ptr<RasterBuffer> buffer) override {}
private:
- RasterTask::Vector completed_tasks_;
+ TileTask::Vector completed_tasks_;
};
base::LazyInstance<FakeTileTaskRunnerImpl> g_fake_tile_task_runner =
LAZY_INSTANCE_INITIALIZER;

Powered by Google App Engine
This is Rietveld 408576698