Index: cc/tiles/gpu_image_decode_controller.cc |
diff --git a/cc/tiles/gpu_image_decode_controller.cc b/cc/tiles/gpu_image_decode_controller.cc |
index da9bd207010071c937c8c6490c1d6511db1b7ab8..00aeb2622e0a55ca9f127b7a62b612543c476fb3 100644 |
--- a/cc/tiles/gpu_image_decode_controller.cc |
+++ b/cc/tiles/gpu_image_decode_controller.cc |
@@ -10,7 +10,7 @@ |
namespace cc { |
-class ImageDecodeTaskImpl : public ImageDecodeTask { |
+class ImageDecodeTaskImpl : public Task { |
public: |
ImageDecodeTaskImpl(GpuImageDecodeController* controller, |
const DrawImage& image, |
@@ -21,6 +21,10 @@ class ImageDecodeTaskImpl : public ImageDecodeTask { |
source_prepare_tiles_id_(source_prepare_tiles_id) {} |
// Overridden from Task: |
+ void ScheduleOnOriginThread() override {} |
+ void CompleteOnOriginThread() override { |
+ controller_->RemovePendingTaskForImage(image_); |
+ } |
void RunOnWorkerThread() override { |
TRACE_EVENT2("cc", "ImageDecodeTaskImpl::RunOnWorkerThread", "mode", "gpu", |
"source_prepare_tiles_id", source_prepare_tiles_id_); |
@@ -29,12 +33,6 @@ class ImageDecodeTaskImpl : public ImageDecodeTask { |
controller_->DecodeImage(image_); |
} |
- // Overridden from TileTask: |
- void ScheduleOnOriginThread(TileTaskClient* client) override {} |
- void CompleteOnOriginThread(TileTaskClient* client) override { |
- controller_->RemovePendingTaskForImage(image_); |
- } |
- |
protected: |
~ImageDecodeTaskImpl() override {} |
@@ -54,7 +52,7 @@ GpuImageDecodeController::~GpuImageDecodeController() {} |
bool GpuImageDecodeController::GetTaskForImageAndRef( |
const DrawImage& image, |
uint64_t prepare_tiles_id, |
- scoped_refptr<ImageDecodeTask>* task) { |
+ scoped_refptr<Task>* task) { |
auto image_id = image.image()->uniqueID(); |
base::AutoLock lock(lock_); |
if (prerolled_images_.count(image_id) != 0) { |
@@ -62,8 +60,7 @@ bool GpuImageDecodeController::GetTaskForImageAndRef( |
return false; |
} |
- scoped_refptr<ImageDecodeTask>& existing_task = |
- pending_image_tasks_[image_id]; |
+ scoped_refptr<Task>& existing_task = pending_image_tasks_[image_id]; |
if (!existing_task) { |
existing_task = make_scoped_refptr( |
new ImageDecodeTaskImpl(this, image, prepare_tiles_id)); |