Chromium Code Reviews| Index: cc/tiles/software_image_decode_controller.cc |
| diff --git a/cc/tiles/software_image_decode_controller.cc b/cc/tiles/software_image_decode_controller.cc |
| index 93d017f186fa0dd34000ca815ef3f7ff637cdc17..916365365563d072e834a415acae517f9407d644 100644 |
| --- a/cc/tiles/software_image_decode_controller.cc |
| +++ b/cc/tiles/software_image_decode_controller.cc |
| @@ -71,15 +71,12 @@ class ImageDecodeTaskImpl : public ImageDecodeTask { |
| controller_->DecodeImage(image_key_, image_); |
| } |
| - // Overridden from TileTask: |
| - void ScheduleOnOriginThread(TileTaskClient* client) override {} |
| - void CompleteOnOriginThread(TileTaskClient* client) override { |
| + protected: |
| + ~ImageDecodeTaskImpl() override { |
| controller_->RemovePendingTask(image_key_); |
|
prashant.n
2016/04/08 16:38:39
By moving this code from CompleteOnOriginThread()
vmpstr
2016/04/08 18:59:16
No, this doesn't work. The task is kept alive by t
|
| + LOG(ERROR) << "PRAS2::" << __FUNCTION__; |
| } |
| - protected: |
| - ~ImageDecodeTaskImpl() override {} |
| - |
| private: |
| SoftwareImageDecodeController* controller_; |
| SoftwareImageDecodeController::ImageKey image_key_; |
| @@ -219,6 +216,7 @@ bool SoftwareImageDecodeController::GetTaskForImageAndRef( |
| // If the task exists, return it. |
| scoped_refptr<ImageDecodeTask>& existing_task = pending_image_tasks_[key]; |
| if (existing_task) { |
| + LOG(ERROR) << "PRAS::existing " << __FUNCTION__; |
| RefImage(key); |
| *task = existing_task; |
| SanityCheckState(__LINE__, true); |
| @@ -243,6 +241,7 @@ bool SoftwareImageDecodeController::GetTaskForImageAndRef( |
| existing_task = make_scoped_refptr( |
| new ImageDecodeTaskImpl(this, key, image, prepare_tiles_id)); |
| *task = existing_task; |
| + LOG(ERROR) << "PRAS::new " << __FUNCTION__; |
| SanityCheckState(__LINE__, true); |
| return true; |
| } |