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

Unified Diff: cc/raster/task_graph_work_queue.h

Issue 1690023005: Revert of Refactor signaling in RWP (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
« no previous file with comments | « no previous file | cc/raster/task_graph_work_queue.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/raster/task_graph_work_queue.h
diff --git a/cc/raster/task_graph_work_queue.h b/cc/raster/task_graph_work_queue.h
index ed1af185810e395fe88cc903536d93fe2b707de8..95d3c772c24f22ea478757e2d1a81d40ab231b9e 100644
--- a/cc/raster/task_graph_work_queue.h
+++ b/cc/raster/task_graph_work_queue.h
@@ -60,11 +60,11 @@
// category.
std::map<uint16_t, PrioritizedTask::Vector> ready_to_run_tasks;
- // This set contains all currently running tasks.
- std::map<uint16_t, Task::Vector> running_tasks;
-
// Completed tasks not yet collected by origin thread.
Task::Vector completed_tasks;
+
+ // This set contains all currently running tasks.
+ Task::Vector running_tasks;
};
TaskGraphWorkQueue();
@@ -112,12 +112,7 @@
static bool HasFinishedRunningTasksInNamespace(
const TaskNamespace* task_namespace) {
- return std::all_of(
- task_namespace->running_tasks.cbegin(),
- task_namespace->running_tasks.cend(),
- [](const std::pair<uint16_t, Task::Vector>& tasks_entry) {
- return tasks_entry.second.empty();
- }) &&
+ return task_namespace->running_tasks.empty() &&
!HasReadyToRunTasksInNamespace(task_namespace);
}
@@ -150,18 +145,6 @@
return ready_to_run_namespaces_;
}
- size_t NumRunningTasksForCategory(uint16_t category) const {
- size_t count = 0;
- for (const auto& task_namespace_entry : namespaces_) {
- const auto& running_tasks = task_namespace_entry.second.running_tasks;
- const auto& running_tasks_for_category = running_tasks.find(category);
- if (running_tasks_for_category != running_tasks.cend()) {
- count += running_tasks_for_category->second.size();
- }
- }
- return count;
- }
-
// Helper function which ensures that graph dependencies were correctly
// configured.
static bool DependencyMismatch(const TaskGraph* graph);
« no previous file with comments | « no previous file | cc/raster/task_graph_work_queue.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698