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

Unified Diff: cc/resources/task_graph_runner_unittest.cc

Issue 943813002: cc: Add TaskGraphRunner sub-namespaces with task concurrency limits. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/resources/task_graph_runner_unittest.cc
diff --git a/cc/resources/task_graph_runner_unittest.cc b/cc/resources/task_graph_runner_unittest.cc
index afc369d737a573765c93024043d2840af4aa66a4..6e6b37ec065c3f19b716352203445be42b8866f2 100644
--- a/cc/resources/task_graph_runner_unittest.cc
+++ b/cc/resources/task_graph_runner_unittest.cc
@@ -82,19 +82,24 @@ class TaskGraphRunnerTestBase {
Task::Vector new_dependents;
TaskGraph new_graph;
+ int sub_namespace = 0;
+ int max_concurrent_tasks = 4;
danakj 2015/02/23 18:45:01 no tests with different values to verify this work
+
for (std::vector<TaskInfo>::const_iterator it = tasks.begin();
it != tasks.end();
++it) {
scoped_refptr<FakeTaskImpl> new_task(
new FakeTaskImpl(this, it->namespace_index, it->id));
- new_graph.nodes.push_back(
- TaskGraph::Node(new_task.get(), it->priority, 0u));
+ new_graph.nodes.push_back(TaskGraph::Node(new_task.get(), it->priority,
+ 0u, sub_namespace,
+ max_concurrent_tasks));
for (unsigned i = 0; i < it->dependent_count; ++i) {
scoped_refptr<FakeDependentTaskImpl> new_dependent_task(
new FakeDependentTaskImpl(
this, it->namespace_index, it->dependent_id));
new_graph.nodes.push_back(
- TaskGraph::Node(new_dependent_task.get(), it->priority, 1u));
+ TaskGraph::Node(new_dependent_task.get(), it->priority, 1u,
+ sub_namespace, max_concurrent_tasks));
new_graph.edges.push_back(
TaskGraph::Edge(new_task.get(), new_dependent_task.get()));

Powered by Google App Engine
This is Rietveld 408576698