Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1866)

Unified Diff: cc/raster/task_graph_runner.h

Issue 1866043006: cc: Remove ScheduleOnOriginThread() and CompleteOnOriginThread(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: wip - fixed few unit tests Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_;
};

Powered by Google App Engine
This is Rietveld 408576698