Chromium Code Reviews| Index: cc/raster/task_graph_runner.h |
| diff --git a/cc/raster/task_graph_runner.h b/cc/raster/task_graph_runner.h |
| index d5f8ceecb1935e340135fb05f1d775e074129eb1..8aa0d8999059a9dba7bc2716448c32a539aca1ea 100644 |
| --- a/cc/raster/task_graph_runner.h |
| +++ b/cc/raster/task_graph_runner.h |
| @@ -21,6 +21,9 @@ 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. |
| @@ -28,6 +31,8 @@ class CC_EXPORT Task : public base::RefCountedThreadSafe<Task> { |
| public: |
| typedef std::vector<scoped_refptr<Task>> Vector; |
| + TaskTypeId GetTaskTypeId(); |
|
prashant.n
2016/04/11 14:17:48
This looks little wierd. But I don't see any other
|
| + |
| // Subclasses should implement this method. RunOnWorkerThread may be called |
| // on any thread, and subclasses are responsible for locking and thread |
| // safety. |
| @@ -40,9 +45,12 @@ class CC_EXPORT Task : public base::RefCountedThreadSafe<Task> { |
| protected: |
| friend class base::RefCountedThreadSafe<Task>; |
| + void SetTaskTypeId(TaskTypeId type_id); |
| + |
| Task(); |
| virtual ~Task(); |
| + TaskTypeId type_id_; |
| bool will_run_; |
| bool did_run_; |
| }; |