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

Unified Diff: cc/raster/task_graph_runner.h

Issue 1854723002: cc: Simplify task and its derived classes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Corrected scope of dependencies. 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 23094ef5a7ef3c81a6cae0fbde931c57c11efe98..ad8bc38fd8306e38feb906022e06dc2b08afa42b 100644
--- a/cc/raster/task_graph_runner.h
+++ b/cc/raster/task_graph_runner.h
@@ -16,37 +16,12 @@
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
#include "cc/base/cc_export.h"
+#include "cc/raster/task.h"
namespace cc {
class TaskGraphRunner;
-// 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;
-
- // 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>;
-
- Task();
- virtual ~Task();
-
- 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
« no previous file with comments | « cc/raster/task.cc ('k') | cc/raster/task_graph_runner.cc » ('j') | cc/tiles/tile_manager.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698