Index: cc/raster/tile_task_runner.h |
diff --git a/cc/raster/tile_task_runner.h b/cc/raster/tile_task_runner.h |
index dc1586a606b5ebc541ffc000279bcc1514c6936e..3bda3ad8709bffea25830d01d672565181952724 100644 |
--- a/cc/raster/tile_task_runner.h |
+++ b/cc/raster/tile_task_runner.h |
@@ -11,7 +11,7 @@ |
#include "base/callback.h" |
#include "cc/raster/raster_buffer.h" |
-#include "cc/raster/task_graph_runner.h" |
+#include "cc/raster/task.h" |
#include "cc/resources/resource_format.h" |
namespace cc { |
@@ -20,6 +20,16 @@ class CC_EXPORT TileTask : public Task { |
public: |
typedef std::vector<scoped_refptr<TileTask>> Vector; |
+ const TileTask::Vector& dependencies() const { return dependencies_; } |
+ |
+ // Indicates whether this TileTask can be run at the same time as other tasks |
+ // in the task graph. If false, this task will be scheduled with |
+ // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. The base implementation always |
+ // returns true. |
+ bool SupportsConcurrentExecution() const { |
reveman
2016/04/19 07:08:17
This should not be CamelCase as a simple getter. S
|
+ return supports_concurrent_execution_; |
+ } |
+ |
virtual void ScheduleOnOriginThread(RasterBufferProvider* provider) = 0; |
virtual void CompleteOnOriginThread(RasterBufferProvider* provider) = 0; |
@@ -32,49 +42,16 @@ class CC_EXPORT TileTask : public Task { |
bool HasCompleted() const; |
protected: |
- TileTask(); |
+ explicit TileTask(bool supports_concurrent_execution); |
+ TileTask(bool supports_concurrent_execution, TileTask::Vector* dependencies); |
~TileTask() override; |
+ const bool supports_concurrent_execution_; |
+ TileTask::Vector dependencies_; |
bool did_schedule_; |
bool did_complete_; |
}; |
-class CC_EXPORT ImageDecodeTask : public TileTask { |
- public: |
- typedef std::vector<scoped_refptr<ImageDecodeTask>> Vector; |
- |
- // Indicates whether this ImageDecodeTask can be run at the same time as |
- // other tasks in the task graph. If false, this task will be scheduled with |
- // TASK_CATEGORY_NONCONCURRENT_FOREGROUND. The base implementation always |
- // returns true. |
- virtual bool SupportsConcurrentExecution() const; |
- |
- // Returns an optional task which this task depends on. May be null. |
- const scoped_refptr<ImageDecodeTask>& dependency() { return dependency_; } |
- |
- protected: |
- ImageDecodeTask(); |
- explicit ImageDecodeTask(scoped_refptr<ImageDecodeTask> dependency); |
- ~ImageDecodeTask() override; |
- |
- private: |
- scoped_refptr<ImageDecodeTask> dependency_; |
-}; |
- |
-class CC_EXPORT RasterTask : public TileTask { |
- public: |
- typedef std::vector<scoped_refptr<RasterTask>> Vector; |
- |
- const ImageDecodeTask::Vector& dependencies() const { return dependencies_; } |
- |
- protected: |
- explicit RasterTask(ImageDecodeTask::Vector* dependencies); |
- ~RasterTask() override; |
- |
- private: |
- ImageDecodeTask::Vector dependencies_; |
-}; |
- |
// This interface can be used to schedule and run tile tasks. |
// The client can call CheckForCompletedTasks() at any time to dispatch |
// pending completion callbacks for all tasks that have finished running. |