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

Unified Diff: cc/raster/task_graph_runner.h

Issue 1489233003: TaskGraphRunner Group support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: rebase Created 5 years 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/raster/task_graph_runner_perftest.cc » ('j') | cc/raster/task_graph_work_queue.h » ('J')
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 b5ffade02bdbbdbbff85ca230192c2da161bbdf9..4c6e98cc34d3915395ab7deccdcf3beda3285b99 100644
--- a/cc/raster/task_graph_runner.h
+++ b/cc/raster/task_graph_runner.h
@@ -46,18 +46,23 @@ class CC_EXPORT Task : public base::RefCountedThreadSafe<Task> {
// 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 priority and a run count that matches the number of dependencies.
-// Priority range from 0 (most favorable scheduling) to UINT_MAX
-// (least favorable).
+// a group, a priority and a run count that matches the number of dependencies.
reveman 2015/12/04 02:30:53 how do you feel about "category" instead of "group
ericrk 2015/12/04 19:14:30 hmm, either seems fine to me, I'll switch to categ
+// Priority range from 0 (most favorable scheduling) to UINT16_MAX
+// (least favorable). Groups range from 0 to UINT16_MAX. It is up to the
+// implementation and its consumer to determine the meaning (if any) of a group.
reveman 2015/12/04 02:30:53 Can we make it clear here that group and priority
ericrk 2015/12/04 19:14:30 Done.
struct CC_EXPORT TaskGraph {
struct Node {
typedef std::vector<Node> Vector;
reveman 2015/12/04 02:30:53 Btw, I'd like to remove all these Vector typedefs
ericrk 2015/12/04 19:14:30 will clean these up in a follow-up
- Node(Task* task, size_t priority, size_t dependencies)
- : task(task), priority(priority), dependencies(dependencies) {}
+ Node(Task* task, uint16_t group, uint16_t priority, size_t dependencies)
+ : task(task),
+ group(group),
+ priority(priority),
+ dependencies(dependencies) {}
Task* task;
- size_t priority;
+ uint16_t group;
+ uint16_t priority;
size_t dependencies;
reveman 2015/12/04 02:30:53 How about we also change |dependencies| to uint32_
ericrk 2015/12/04 19:14:30 yup - that's definitely better.
};
« no previous file with comments | « no previous file | cc/raster/task_graph_runner_perftest.cc » ('j') | cc/raster/task_graph_work_queue.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698