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

Unified Diff: cc/raster/task_graph_work_queue.h

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.h
diff --git a/cc/raster/task_graph_work_queue.h b/cc/raster/task_graph_work_queue.h
index 0c82f67678a73be42e3424c6c27170ddcc716260..010b847b0c756f60a02da5f5e3e0629f575ee3ae 100644
--- a/cc/raster/task_graph_work_queue.h
+++ b/cc/raster/task_graph_work_queue.h
@@ -16,6 +16,12 @@
namespace cc {
+class CC_EXPORT TaskGraphWorkQueueClient {
+ virtual void AdjustWorkerPriorityForTask(Task* task,
+ uint16_t old_category,
+ uint16_t new_category) = 0;
+};
+
// Implements a queue of incoming TaskGraph work. Designed for use by
// implementations of TaskGraphRunner. Not thread safe, so the caller is
// responsible for all necessary locking.
@@ -70,7 +76,7 @@ class CC_EXPORT TaskGraphWorkQueue {
std::vector<CategorizedTask> running_tasks;
};
- TaskGraphWorkQueue();
+ explicit TaskGraphWorkQueue(TaskGraphWorkQueueClient* client);
virtual ~TaskGraphWorkQueue();
// Gets a NamespaceToken which is guaranteed to be unique within this
@@ -175,6 +181,8 @@ class CC_EXPORT TaskGraphWorkQueue {
}
};
+ TaskGraphWorkQueueClient* client_;
+
using TaskNamespaceMap =
std::map<NamespaceToken, TaskNamespace, CompareToken>;

Powered by Google App Engine
This is Rietveld 408576698