| 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..82f58a60181a7e813baeab0956675f83e751972f 100644
|
| --- a/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
|
| +++ b/third_party/WebKit/Source/platform/scheduler/base/time_domain.h
|
| @@ -64,7 +64,8 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
|
|
|
| // Some TimeDomains support virtual time, this method tells us to advance time
|
| // if possible and return true if time was advanced.
|
| - virtual bool MaybeAdvanceTime() = 0;
|
| + virtual base::Optional<base::TimeDelta> DelayTillNextTask(
|
| + LazyNow* lazy_now) = 0;
|
|
|
| // Returns the name of this time domain for tracing.
|
| virtual const char* GetName() const = 0;
|
| @@ -88,10 +89,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
|
| // the next task was posted to and it returns true. Returns false otherwise.
|
| bool NextScheduledTaskQueue(TaskQueue** out_task_queue) const;
|
|
|
| - // Adds |queue| to the set of task queues that UpdateWorkQueues calls
|
| - // UpdateWorkQueue on.
|
| - void RegisterAsUpdatableTaskQueue(internal::TaskQueueImpl* queue);
|
| -
|
| // Schedules a call to TaskQueueImpl::WakeUpForDelayedWork when this
|
| // TimeDomain reaches |delayed_run_time|. This supersedes any previously
|
| // registered wakeup for |queue|.
|
| @@ -102,15 +99,12 @@ 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);
|
|
|
| - // Updates active queues associated with this TimeDomain.
|
| - void UpdateWorkQueues(LazyNow lazy_now);
|
| + // Tells the time domain that |queue| went from having no immediate work to
|
| + // having some.
|
| + void OnQueueHasImmediateWork(internal::TaskQueueImpl* queue);
|
|
|
| // Called by the TaskQueueManager when the TimeDomain is registered.
|
| virtual void OnRegisterWithTaskQueueManager(
|
| @@ -136,8 +130,6 @@ class BLINK_PLATFORM_EXPORT TimeDomain {
|
| }
|
|
|
| private:
|
| - void MoveNewlyUpdatableQueuesIntoUpdatableQueueSet();
|
| -
|
| struct DelayedWakeup {
|
| base::TimeTicks time;
|
| internal::TaskQueueImpl* queue;
|
| @@ -164,15 +156,6 @@ 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_;
|
| -
|
| - // Set of task queues with avaliable work on the incoming queue. This should
|
| - // only be accessed from the main thread.
|
| - std::set<internal::TaskQueueImpl*> updatable_queue_set_;
|
| -
|
| Observer* observer_; // NOT OWNED.
|
|
|
| base::ThreadChecker main_thread_checker_;
|
|
|