diff options
Diffstat (limited to 'cc/resources/image_raster_worker_pool.cc')
-rw-r--r-- | cc/resources/image_raster_worker_pool.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/cc/resources/image_raster_worker_pool.cc b/cc/resources/image_raster_worker_pool.cc index c2fe395..1d96b27 100644 --- a/cc/resources/image_raster_worker_pool.cc +++ b/cc/resources/image_raster_worker_pool.cc @@ -27,7 +27,7 @@ class ImageWorkerPoolTaskImpl : public internal::WorkerPoolTask { } // Overridden from internal::WorkerPoolTask: - virtual void RunOnThread(unsigned thread_index) OVERRIDE { + virtual void RunOnWorkerThread(unsigned thread_index) OVERRIDE { if (!buffer_) return; @@ -38,9 +38,9 @@ class ImageWorkerPoolTaskImpl : public internal::WorkerPoolTask { stride_); bitmap.setPixels(buffer_); SkDevice device(bitmap); - task_->RunOnThread(&device, thread_index); + task_->RunOnWorkerThread(&device, thread_index); } - virtual void DispatchCompletionCallback() OVERRIDE { + virtual void CompleteOnOriginThread() OVERRIDE { reply_.Run(!HasFinishedRunning()); } @@ -120,8 +120,9 @@ void ImageRasterWorkerPool::OnRasterTaskCompleted( resource_provider()->BindImage(task->resource()->id()); task->DidRun(was_canceled); + task->WillComplete(); + task->CompleteOnOriginThread(); task->DidComplete(); - task->DispatchCompletionCallback(); image_tasks_.erase(task.get()); } |