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 6c8bbd7a2720e586c4a1a6cb073718f7adc4a0bd..7a8e3a1063862e0ea6aa27dbf56a5ab08ba604b3 100644 |
--- a/cc/tiles/software_image_decode_controller.cc |
+++ b/cc/tiles/software_image_decode_controller.cc |
@@ -16,7 +16,6 @@ |
#include "base/thread_task_runner_handle.h" |
#include "base/trace_event/memory_dump_manager.h" |
#include "cc/debug/devtools_instrumentation.h" |
-#include "cc/raster/tile_task_runner.h" |
#include "third_party/skia/include/core/SkCanvas.h" |
#include "third_party/skia/include/core/SkImage.h" |
#include "ui/gfx/skia_util.h" |
@@ -41,7 +40,7 @@ class AutoRemoveKeyFromTaskMap { |
public: |
AutoRemoveKeyFromTaskMap( |
std::unordered_map<SoftwareImageDecodeController::ImageKey, |
- scoped_refptr<ImageDecodeTask>, |
+ scoped_refptr<Task>, |
SoftwareImageDecodeController::ImageKeyHash>* task_map, |
const SoftwareImageDecodeController::ImageKey& key) |
: task_map_(task_map), key_(key) {} |
@@ -49,12 +48,12 @@ class AutoRemoveKeyFromTaskMap { |
private: |
std::unordered_map<SoftwareImageDecodeController::ImageKey, |
- scoped_refptr<ImageDecodeTask>, |
+ scoped_refptr<Task>, |
SoftwareImageDecodeController::ImageKeyHash>* task_map_; |
SoftwareImageDecodeController::ImageKey key_; |
}; |
-class ImageDecodeTaskImpl : public ImageDecodeTask { |
+class ImageDecodeTaskImpl : public Task { |
public: |
ImageDecodeTaskImpl(SoftwareImageDecodeController* controller, |
const SoftwareImageDecodeController::ImageKey& image_key, |
@@ -65,7 +64,7 @@ class ImageDecodeTaskImpl : public ImageDecodeTask { |
image_(image), |
image_ref_(skia::SharePtr(image.image())), |
source_prepare_tiles_id_(source_prepare_tiles_id) { |
- SetTaskTypeId(TASK_TYPE_IMAGE_DECODE); |
+ SetTaskType(TASK_TYPE_IMAGE_DECODE); |
} |
// Overridden from Task: |
@@ -149,7 +148,7 @@ SoftwareImageDecodeController::~SoftwareImageDecodeController() { |
bool SoftwareImageDecodeController::GetTaskForImageAndRef( |
const DrawImage& image, |
uint64_t prepare_tiles_id, |
- scoped_refptr<ImageDecodeTask>* task) { |
+ scoped_refptr<Task>* task) { |
// If the image already exists or if we're going to create a task for it, then |
// we'll likely need to ref this image (the exception is if we're prerolling |
// the image only). That means the image is or will be in the cache. When the |
@@ -176,7 +175,7 @@ bool SoftwareImageDecodeController::GetTaskForImageAndRef( |
if (!CanHandleImage(key)) { |
base::AutoLock lock(lock_); |
if (prerolled_images_.count(key.image_id()) == 0) { |
- scoped_refptr<ImageDecodeTask>& existing_task = pending_image_tasks_[key]; |
+ scoped_refptr<Task>& existing_task = pending_image_tasks_[key]; |
if (!existing_task) { |
existing_task = make_scoped_refptr( |
new ImageDecodeTaskImpl(this, key, image, prepare_tiles_id)); |
@@ -209,7 +208,7 @@ bool SoftwareImageDecodeController::GetTaskForImageAndRef( |
} |
// If the task exists, return it. |
- scoped_refptr<ImageDecodeTask>& existing_task = pending_image_tasks_[key]; |
+ scoped_refptr<Task>& existing_task = pending_image_tasks_[key]; |
if (existing_task) { |
RefImage(key); |
*task = existing_task; |