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

Unified Diff: cc/resources/task_graph_runner.h

Issue 147883003: cc: Add useful TaskGraphRunner performance tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: while loop cleanup Created 6 years, 11 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 | « no previous file | cc/resources/task_graph_runner.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/resources/task_graph_runner.h
diff --git a/cc/resources/task_graph_runner.h b/cc/resources/task_graph_runner.h
index af7c11650ce6011ecc90c626da5a1d53a3d4afa1..eb03467520f3c5cf82eec2be11a329650df62fae 100644
--- a/cc/resources/task_graph_runner.h
+++ b/cc/resources/task_graph_runner.h
@@ -142,6 +142,10 @@ class CC_EXPORT TaskGraphRunner : public base::DelegateSimpleThread::Delegate {
void CollectCompletedTasks(NamespaceToken token,
Task::Vector* completed_tasks);
+ // Run one task on current thread. Returns false if no tasks are ready
+ // to run. This should only be used by tests.
+ bool RunTaskForTesting();
+
private:
struct TaskNamespace {
typedef std::vector<TaskNamespace*> Vector;
@@ -192,6 +196,10 @@ class CC_EXPORT TaskGraphRunner : public base::DelegateSimpleThread::Delegate {
// Overridden from base::DelegateSimpleThread:
virtual void Run() OVERRIDE;
+ // Run next task. Caller must acquire |lock_| prior to calling this
+ // function and make sure at least one task is ready to run.
+ void RunTaskWithLockAcquired(int thread_index);
+
// This lock protects all members of this class. Do not read or modify
// anything without holding this lock. Do not block while holding this
// lock.
« no previous file with comments | « no previous file | cc/resources/task_graph_runner.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698