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..04f81894385719eedc7735737aa3584a36dd3590 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,14 @@ 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. |
+ virtual bool SupportsConcurrentExecution() const; |
reveman
2016/04/19 00:05:30
can this be a implemented using a "const bool supp
prashant.n
2016/04/19 01:19:02
Yes.
|
+ |
virtual void ScheduleOnOriginThread(RasterBufferProvider* provider) = 0; |
virtual void CompleteOnOriginThread(RasterBufferProvider* provider) = 0; |
@@ -33,48 +41,14 @@ class CC_EXPORT TileTask : public Task { |
protected: |
TileTask(); |
+ explicit TileTask(TileTask::Vector* dependencies); |
~TileTask() override; |
+ 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. |