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

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: Fix bug in MoveHoleDown 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..d69549329712c0d38865b4f485f1d868861205b3 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,20 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
// TimeDomain. Must be called from the main thread.
void WakeUpForDelayedWork(LazyNow* lazy_now);
+ base::TimeTicks time_domain_wakeup() const {
+ return main_thread_only().time_domain_wakeup;
+ }
+
+ void set_time_domain_wakeup(base::TimeTicks time_domain_wakeup) {
+ main_thread_only().time_domain_wakeup = 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 +229,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 time_domain_wakeup;
Sami 2016/10/14 07:26:16 It's a bit unclear what this is. |scheduled_time_d
alex clarke (OOO till 29th) 2016/10/14 13:55:35 Done.
};
~TaskQueueImpl() override;

Powered by Google App Engine
This is Rietveld 408576698