| 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 6f85115a9f73d05b35a6f9a4ed51a3847c7d5c24..4ec3b61ad821c6c22c44f5447c1bfa44c071036e 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
|
| @@ -140,9 +140,16 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
|
| const char* GetName() const override;
|
| QueueType GetQueueType() const override;
|
|
|
| - // If this returns false then future updates for this queue are not needed
|
| - // unless requested.
|
| - bool MaybeUpdateImmediateWorkQueues();
|
| + // Returns true if a posted immediate task could run (i.e. the queue is
|
| + // enabled and not blocked by a fence). Must only be called from the thread
|
| + // this task queue was created on
|
| + bool ImmediateTaskCouldRun() const;
|
| +
|
| + // Returns the current queue of immediate incoming tasks.
|
| + WTF::Deque<TaskQueueImpl::Task> TakeImmediateIncomingQueue();
|
| +
|
| + // Must only be called from the thread this task queue was created on.
|
| + void ReloadImmediateWorkQueueIfEmpty();
|
|
|
| void AsValueInto(base::trace_event::TracedValue* state) const;
|
|
|
| @@ -173,9 +180,9 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
|
| }
|
|
|
| // Enqueues any delayed tasks which should be run now on the
|
| - // |delayed_work_queue|. It also schedules the next wake up with the
|
| - // TimeDomain. Must be called from the main thread.
|
| - void WakeUpForDelayedWork(LazyNow* lazy_now);
|
| + // |delayed_work_queue|. Returns the deadline if a subsequent wakeup is
|
| + // required. Must be called from the main thread.
|
| + base::Optional<base::TimeTicks> WakeUpForDelayedWork(LazyNow* lazy_now);
|
|
|
| base::TimeTicks scheduled_time_domain_wakeup() const {
|
| return main_thread_only().scheduled_time_domain_wakeup;
|
| @@ -193,6 +200,7 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
|
| main_thread_only().heap_handle = heap_handle;
|
| }
|
|
|
| + void PushImmediateIncomingTaskForTest(TaskQueueImpl::Task&& task);
|
| EnqueueOrder GetFenceForTest() const;
|
|
|
| class QueueEnabledVoterImpl : public QueueEnabledVoter {
|
| @@ -294,9 +302,6 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
|
| EnqueueOrder sequence_number,
|
| bool nestable);
|
|
|
| - // As BlockedByFence but safe to be called while locked.
|
| - bool BlockedByFenceLocked() const;
|
| -
|
| void TraceQueueSize(bool is_locked) const;
|
| static void QueueAsValueInto(const WTF::Deque<Task>& queue,
|
| base::trace_event::TracedValue* state);
|
| @@ -323,9 +328,9 @@ class BLINK_PLATFORM_EXPORT TaskQueueImpl final : public TaskQueue {
|
| }
|
|
|
| const QueueType type_;
|
| - const char* name_;
|
| - const char* disabled_by_default_tracing_category_;
|
| - const char* disabled_by_default_verbose_tracing_category_;
|
| + const char* const name_;
|
| + const char* const disabled_by_default_tracing_category_;
|
| + const char* const disabled_by_default_verbose_tracing_category_;
|
|
|
| base::ThreadChecker main_thread_checker_;
|
| MainThreadOnly main_thread_only_;
|
|
|