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

Unified Diff: cc/tiles/software_image_decode_controller.cc

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip 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/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;
}

Powered by Google App Engine
This is Rietveld 408576698