Index: cc/raster/task_graph_runner.h |
diff --git a/cc/raster/task_graph_runner.h b/cc/raster/task_graph_runner.h |
index 8aa0d8999059a9dba7bc2716448c32a539aca1ea..811dcf26a4fb5236643393ad1117c941e2206bf1 100644 |
--- a/cc/raster/task_graph_runner.h |
+++ b/cc/raster/task_graph_runner.h |
@@ -16,45 +16,12 @@ |
#include "base/logging.h" |
#include "base/memory/ref_counted.h" |
#include "cc/base/cc_export.h" |
+#include "cc/raster/task.h" |
namespace cc { |
class TaskGraphRunner; |
-typedef uint32_t TaskTypeId; |
-const TaskTypeId kDefaultTaskTypeId = 0; |
- |
-// A task which can be run by a TaskGraphRunner. To run a Task, it should be |
-// inserted into a TaskGraph, which can then be scheduled on the |
-// TaskGraphRunner. |
-class CC_EXPORT Task : public base::RefCountedThreadSafe<Task> { |
- public: |
- typedef std::vector<scoped_refptr<Task>> Vector; |
- |
- TaskTypeId GetTaskTypeId(); |
- |
- // Subclasses should implement this method. RunOnWorkerThread may be called |
- // on any thread, and subclasses are responsible for locking and thread |
- // safety. |
- virtual void RunOnWorkerThread() = 0; |
- |
- void WillRun(); |
- void DidRun(); |
- bool HasFinishedRunning() const; |
- |
- protected: |
- friend class base::RefCountedThreadSafe<Task>; |
- |
- void SetTaskTypeId(TaskTypeId type_id); |
- |
- Task(); |
- virtual ~Task(); |
- |
- TaskTypeId type_id_; |
- bool will_run_; |
- bool did_run_; |
-}; |
- |
// A task dependency graph describes the order in which to execute a set |
// of tasks. Dependencies are represented as edges. Each node is assigned |
// a category, a priority and a run count that matches the number of |