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 1489233003: TaskGraphRunner Group support (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@refactor
Patch Set: 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 | « cc/raster/synchronous_task_graph_runner.cc ('k') | cc/raster/task_graph_runner_perftest.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 b5ffade02bdbbdbbff85ca230192c2da161bbdf9..181a455057234d636b4eca032e8d4c64443616b8 100644
--- a/cc/raster/task_graph_runner.h
+++ b/cc/raster/task_graph_runner.h
@@ -46,19 +46,29 @@ 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 category, a priority and a run count that matches the number of
+// dependencies. Priority range from 0 (most favorable scheduling) to UINT16_MAX
+// (least favorable). Categories range from 0 to UINT16_MAX. It is up to the
+// implementation and its consumer to determine the meaning (if any) of a
+// category. A TaskGraphRunner implementation may chose to prioritize certain
+// categories over others, regardless of the individual priorities of tasks.
struct CC_EXPORT TaskGraph {
struct Node {
typedef std::vector<Node> Vector;
- Node(Task* task, size_t priority, size_t dependencies)
- : task(task), priority(priority), dependencies(dependencies) {}
+ Node(Task* task,
+ uint16_t category,
+ uint16_t priority,
+ uint32_t dependencies)
+ : task(task),
+ category(category),
+ priority(priority),
+ dependencies(dependencies) {}
Task* task;
- size_t priority;
- size_t dependencies;
+ uint16_t category;
+ uint16_t priority;
+ uint32_t dependencies;
};
struct Edge {
« no previous file with comments | « cc/raster/synchronous_task_graph_runner.cc ('k') | cc/raster/task_graph_runner_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698