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

Unified Diff: cc/raster/task_graph_runner.h

Issue 1890903002: cc: Simplify Task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@remove_tile_task_runner
Patch Set: nits 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 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

Powered by Google App Engine
This is Rietveld 408576698