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..b48a7eadf3de0be8fa323594b87b6edf13eb70de 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; |
prashant.n
2016/04/19 04:38:23
OR we can have pure virtual function to make deriv
reveman
2016/04/19 05:02:16
The point of adding the member was to remove the n
prashant.n
2016/04/19 05:28:07
Aaah. I missed to remove virtual keyword.
I took
|
+ |
virtual void ScheduleOnOriginThread(RasterBufferProvider* provider) = 0; |
virtual void CompleteOnOriginThread(RasterBufferProvider* provider) = 0; |
@@ -32,49 +40,16 @@ class CC_EXPORT TileTask : public Task { |
bool HasCompleted() const; |
protected: |
- TileTask(); |
+ explicit TileTask(bool supports_concurrent_execution); |
prashant.n
2016/04/19 04:06:02
Here we cannot prevent implicit cast of pointer to
|
+ 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. |