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

Unified Diff: cc/raster/task_graph_runner.h

Issue 1784623005: Test dynamic priorities (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « base/threading/simple_thread.cc ('k') | cc/raster/task_graph_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..aa36526e5ed475d5562314e750d1dd805c65f4c8 100644
--- a/cc/raster/task_graph_runner.h
+++ b/cc/raster/task_graph_runner.h
@@ -15,7 +15,10 @@
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
+#include "base/threading/simple_thread.h"
+#include "base/time/time.h"
#include "cc/base/cc_export.h"
+#include "cc/raster/task_category.h"
namespace cc {
@@ -33,6 +36,11 @@ class CC_EXPORT Task : public base::RefCountedThreadSafe<Task> {
// safety.
virtual void RunOnWorkerThread() = 0;
+ virtual bool IsRasterTask() { return false; }
+
+ void SetRunner(base::TestSimpleThread* runner) { runner_ = runner; }
+ base::TestSimpleThread* GetRunner() { return runner_; }
+
void WillRun();
void DidRun();
bool HasFinishedRunning() const;
@@ -45,6 +53,8 @@ class CC_EXPORT Task : public base::RefCountedThreadSafe<Task> {
bool will_run_;
bool did_run_;
+
+ base::TestSimpleThread* runner_;
};
// A task dependency graph describes the order in which to execute a set
« no previous file with comments | « base/threading/simple_thread.cc ('k') | cc/raster/task_graph_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698