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

Unified Diff: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h

Issue 2419793002: [Reland] Optimize blink scheduler with an intrusive heap (Closed)
Patch Set: Tiny optimization of MoveHoleDownAndFillWithLeafElement Created 4 years, 2 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: third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
index da66808172335e0d9c06d968a0482f191a08d6fc..c9bbe9540c2055b1cc6c4a3954ef6ab585b5db60 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h
@@ -177,6 +177,22 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
// TimeDomain. Must be called from the main thread.
void WakeUpForDelayedWork(LazyNow* lazy_now);
+ base::TimeTicks scheduled_time_domain_wakeup() const {
+ return main_thread_only().scheduled_time_domain_wakeup;
+ }
+
+ void set_scheduled_time_domain_wakeup(
+ base::TimeTicks scheduled_time_domain_wakeup) {
+ main_thread_only().scheduled_time_domain_wakeup =
+ scheduled_time_domain_wakeup;
+ }
+
+ size_t heap_index() const { return main_thread_only().heap_index; }
+
+ void set_heap_index(size_t heap_index) {
+ main_thread_only().heap_index = heap_index;
+ }
+
private:
friend class WorkQueue;
friend class WorkQueueTest;
@@ -215,9 +231,11 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
std::priority_queue<Task> delayed_incoming_queue;
base::ObserverList<base::MessageLoop::TaskObserver> task_observers;
size_t set_index;
+ size_t heap_index;
bool is_enabled;
base::trace_event::BlameContext* blame_context; // Not owned.
EnqueueOrder current_fence;
+ base::TimeTicks scheduled_time_domain_wakeup;
};
~TaskQueueImpl() override;

Powered by Google App Engine
This is Rietveld 408576698