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

Unified Diff: cc/raster/gpu_tile_task_worker_pool.cc

Issue 1854723002: cc: Simplify task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected scope of dependencies. 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/raster/gpu_tile_task_worker_pool.cc
diff --git a/cc/raster/gpu_tile_task_worker_pool.cc b/cc/raster/gpu_tile_task_worker_pool.cc
index 27d0a4651559e8a5d2402a09aaa422e9824924ca..e157ab5d9392b4e670326eb9a010ea49f642ebb2 100644
--- a/cc/raster/gpu_tile_task_worker_pool.cc
+++ b/cc/raster/gpu_tile_task_worker_pool.cc
@@ -12,7 +12,6 @@
#include "base/trace_event/trace_event.h"
#include "cc/playback/raster_source.h"
#include "cc/raster/gpu_rasterizer.h"
-#include "cc/raster/raster_buffer.h"
#include "cc/raster/scoped_gpu_raster.h"
#include "cc/resources/resource.h"
#include "gpu/command_buffer/client/gles2_interface.h"
@@ -135,7 +134,7 @@ void GpuTileTaskWorkerPool::Shutdown() {
void GpuTileTaskWorkerPool::ScheduleTasks(TaskGraph* graph) {
TRACE_EVENT0("cc", "GpuTileTaskWorkerPool::ScheduleTasks");
- ScheduleTasksOnOriginThread(this, graph);
+ ScheduleTasksOnOriginThread(graph);
// Barrier to sync any new resources to the worker context.
rasterizer_->resource_provider()
@@ -169,11 +168,9 @@ bool GpuTileTaskWorkerPool::GetResourceRequiresSwizzle(
void GpuTileTaskWorkerPool::CompleteTasks(const Task::Vector& tasks) {
for (auto& task : tasks) {
- TileTask* tile_task = static_cast<TileTask*>(task.get());
-
- tile_task->WillComplete();
- tile_task->CompleteOnOriginThread(this);
- tile_task->DidComplete();
+ task->WillComplete();
+ task->CompleteOnOriginThread();
+ task->DidComplete();
}
completed_tasks_.clear();
}

Powered by Google App Engine
This is Rietveld 408576698