#include "third_party/blink/renderer/platform/scheduler/worker/compositor_thread_scheduler_impl.h"
#include <memory>
#include <utility>
#include "base/functional/callback.h"
#include "base/task/sequence_manager/task_queue.h"
#include "base/task/single_thread_task_runner.h"
#include "base/threading/thread.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/platform/scheduler/common/features.h"
#include "third_party/blink/renderer/platform/scheduler/common/scheduler_helper.h"
namespace blink {
namespace {
scheduler::CompositorThreadSchedulerImpl* g_compositor_thread_scheduler = …;
}
blink::CompositorThreadScheduler* ThreadScheduler::CompositorThreadScheduler() { … }
namespace scheduler {
CompositorThreadSchedulerImpl::CompositorThreadSchedulerImpl(
base::sequence_manager::SequenceManager* sequence_manager)
: … { … }
CompositorThreadSchedulerImpl::~CompositorThreadSchedulerImpl() { … }
scoped_refptr<NonMainThreadTaskQueue>
CompositorThreadSchedulerImpl::DefaultTaskQueue() { … }
void CompositorThreadSchedulerImpl::OnTaskCompleted(
NonMainThreadTaskQueue* worker_task_queue,
const base::sequence_manager::Task& task,
base::sequence_manager::TaskQueue::TaskTiming* task_timing,
base::LazyNow* lazy_now) { … }
scoped_refptr<scheduler::SingleThreadIdleTaskRunner>
CompositorThreadSchedulerImpl::IdleTaskRunner() { … }
scoped_refptr<base::SingleThreadTaskRunner>
CompositorThreadSchedulerImpl::V8TaskRunner() { … }
scoped_refptr<base::SingleThreadTaskRunner>
CompositorThreadSchedulerImpl::CleanupTaskRunner() { … }
scoped_refptr<base::SingleThreadTaskRunner>
CompositorThreadSchedulerImpl::InputTaskRunner() { … }
scoped_refptr<base::SingleThreadTaskRunner>
CompositorThreadSchedulerImpl::DefaultTaskRunner() { … }
bool CompositorThreadSchedulerImpl::ShouldYieldForHighPriorityWork() { … }
void CompositorThreadSchedulerImpl::AddTaskObserver(
base::TaskObserver* task_observer) { … }
void CompositorThreadSchedulerImpl::RemoveTaskObserver(
base::TaskObserver* task_observer) { … }
void CompositorThreadSchedulerImpl::Shutdown() { … }
void CompositorThreadSchedulerImpl::OnIdleTaskPosted() { … }
base::TimeTicks CompositorThreadSchedulerImpl::WillProcessIdleTask() { … }
void CompositorThreadSchedulerImpl::DidProcessIdleTask() { … }
base::TimeTicks CompositorThreadSchedulerImpl::NowTicks() { … }
void CompositorThreadSchedulerImpl::PostIdleTask(const base::Location& location,
Thread::IdleTask task) { … }
void CompositorThreadSchedulerImpl::PostNonNestableIdleTask(
const base::Location& location,
Thread::IdleTask task) { … }
void CompositorThreadSchedulerImpl::PostDelayedIdleTask(
const base::Location& location,
base::TimeDelta delay,
Thread::IdleTask task) { … }
base::TimeTicks
CompositorThreadSchedulerImpl::MonotonicallyIncreasingVirtualTime() { … }
void CompositorThreadSchedulerImpl::SetV8Isolate(v8::Isolate* isolate) { … }
}
}