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

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

Issue 2640763003: Optimize away updatable_queue_set_ (Closed)
Patch Set: Created 3 years, 11 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/time_domain.h
diff --git a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
index 639d1742a35feec99c4355430a72a7ab048b076a..3ab2e68f42f9caa6d65ceaa5b3c70bd82412d87e 100644
--- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
+++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
@@ -90,7 +90,7 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
// Adds |queue| to the set of task queues that UpdateWorkQueues calls
Sami 2017/01/18 17:57:04 This comment looks out of date now. Also, could y
alex clarke (OOO till 29th) 2017/01/19 08:50:52 Done.
// UpdateWorkQueue on.
- void RegisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue);
+ void OnQueueHasIncomingImmediateWork(internal::TaskQueueImpl* queue);
// Schedules a call to TaskQueueImpl::WakeUpForDelayedWork when this
// TimeDomain reaches |delayed_run_time|. This supersedes any previously
@@ -102,10 +102,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
// Registers the |queue|.
void RegisterQueue(internal::TaskQueueImpl* queue);
- // Removes |queue| from the set of task queues that UpdateWorkQueues calls
- // UpdateWorkQueue on. Returns true if |queue| was updatable.
- bool UnregisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue);
-
// Removes |queue| from all internal data structures.
void UnregisterQueue(internal::TaskQueueImpl* queue);
@@ -136,8 +132,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
}
private:
- void MoveNewlyUpdatableQueuesIntoUpdatableQueueSet();
-
struct DelayedWakeup {
base::TimeTicks time;
internal::TaskQueueImpl* queue;
@@ -164,14 +158,13 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
IntrusiveHeap<DelayedWakeup> delayed_wakeup_queue_;
- // This lock guards only |newly_updatable_|. It's not expected to be heavily
- // contended.
- base::Lock newly_updatable_lock_;
- std::vector<internal::TaskQueueImpl*> newly_updatable_;
+ // This lock guards only |has_incoming_immediate_work_|. It's not expected to
+ // be heavily contended.
+ mutable base::Lock has_incoming_immediate_work_lock_;
// Set of task queues with avaliable work on the incoming queue. This should
Sami 2017/01/18 17:57:04 Is the second sentence still valid? If it's main-t
alex clarke (OOO till 29th) 2017/01/19 08:50:52 Done.
// only be accessed from the main thread.
- std::set<internal::TaskQueueImpl*> updatable_queue_set_;
+ std::set<internal::TaskQueueImpl*> has_incoming_immediate_work_;
Observer* observer_; // NOT OWNED.

Powered by Google App Engine
This is Rietveld 408576698