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

Unified Diff: cc/raster/task_graph_work_queue.cc

Issue 1739993004: content: Implement dynamic priorities for raster threads. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: preparing for checkin. Created 4 years, 9 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/raster/task_graph_work_queue.cc
diff --git a/cc/raster/task_graph_work_queue.cc b/cc/raster/task_graph_work_queue.cc
index 98413eee1a668a196f137dd9f4ce0ffbfe59bdff..de996181130495df7655dec191c7bc3e4eb1aab8 100644
--- a/cc/raster/task_graph_work_queue.cc
+++ b/cc/raster/task_graph_work_queue.cc
@@ -52,7 +52,8 @@ TaskGraphWorkQueue::TaskNamespace::TaskNamespace(const TaskNamespace& other) =
TaskGraphWorkQueue::TaskNamespace::~TaskNamespace() {}
-TaskGraphWorkQueue::TaskGraphWorkQueue() : next_namespace_id_(1) {}
+TaskGraphWorkQueue::TaskGraphWorkQueue(TaskGraphWorkQueueClient* client)
+ : client_(client), next_namespace_id_(1) {}
TaskGraphWorkQueue::~TaskGraphWorkQueue() {}
NamespaceToken TaskGraphWorkQueue::GetNamespaceToken() {
@@ -103,6 +104,13 @@ void TaskGraphWorkQueue::ScheduleTasks(NamespaceToken token, TaskGraph* graph) {
if (std::any_of(task_namespace.running_tasks.begin(),
task_namespace.running_tasks.end(),
[&node](const CategorizedTask& task) {
+ if ((task.second == node.task) &&
+ task.first != node.category) {
+ // Fix lambda error.
+ // client_->AdjustWorkerPriorityForTask(
+ // task.second.get(), (uint16_t)task.first,
+ // (uint16_t)node.category);
+ }
return task.second == node.task;
}))
continue;

Powered by Google App Engine
This is Rietveld 408576698