chromium/cc/scheduler/scheduler_state_machine.cc

// Copyright 2011 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "cc/scheduler/scheduler_state_machine.h"

#include "base/check_op.h"
#include "base/format_macros.h"
#include "base/notreached.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/traced_value.h"
#include "base/values.h"
#include "cc/base/features.h"

namespace cc {

namespace {
// Surfaces and CompositorTimingHistory don't support more than 1 pending swap.
const int kMaxPendingSubmitFrames =;

}  // namespace

SchedulerStateMachine::SchedulerStateMachine(const SchedulerSettings& settings)
    :{}

SchedulerStateMachine::~SchedulerStateMachine() = default;

perfetto::protos::pbzero::ChromeCompositorStateMachineV2::MajorStateV2::
    LayerTreeFrameSinkState
    SchedulerStateMachine::LayerTreeFrameSinkStateToProtozeroEnum(
        LayerTreeFrameSinkState state) {}

perfetto::protos::pbzero::ChromeCompositorStateMachineV2::MajorStateV2::
    BeginImplFrameState
    SchedulerStateMachine::BeginImplFrameStateToProtozeroEnum(
        BeginImplFrameState state) {}

const char* SchedulerStateMachine::BeginImplFrameDeadlineModeToString(
    BeginImplFrameDeadlineMode mode) {}

perfetto::protos::pbzero::ChromeCompositorSchedulerStateV2::
    BeginImplFrameDeadlineMode
    SchedulerStateMachine::BeginImplFrameDeadlineModeToProtozeroEnum(
        BeginImplFrameDeadlineMode mode) {}

perfetto::protos::pbzero::ChromeCompositorStateMachineV2::MajorStateV2::
    BeginMainFrameState
    SchedulerStateMachine::BeginMainFrameStateToProtozeroEnum(
        BeginMainFrameState state) {}

perfetto::protos::pbzero::ChromeCompositorStateMachineV2::MajorStateV2::
    ForcedRedrawOnTimeoutState
    SchedulerStateMachine::ForcedRedrawOnTimeoutStateToProtozeroEnum(
        ForcedRedrawOnTimeoutState state) {}

perfetto::protos::pbzero::ChromeCompositorStateMachineV2::MinorStateV2::
    ScrollHandlerState
    ScrollHandlerStateToProtozeroEnum(ScrollHandlerState state) {}

perfetto::protos::pbzero::ChromeCompositorSchedulerActionV2
SchedulerStateMachine::ActionToProtozeroEnum(Action action) {}

void SchedulerStateMachine::AsProtozeroInto(
    perfetto::protos::pbzero::ChromeCompositorStateMachineV2* state) const {}

bool SchedulerStateMachine::PendingDrawsShouldBeAborted() const {}

bool SchedulerStateMachine::ShouldAbortCurrentFrame() const {}

bool SchedulerStateMachine::ShouldBeginLayerTreeFrameSinkCreation() const {}

bool SchedulerStateMachine::ShouldDraw() const {}

bool SchedulerStateMachine::ShouldUpdateDisplayTree() const {}

bool SchedulerStateMachine::ShouldActivateSyncTree() const {}

bool SchedulerStateMachine::ShouldNotifyBeginMainFrameNotExpectedUntil() const {}

bool SchedulerStateMachine::ShouldNotifyBeginMainFrameNotExpectedSoon() const {}

bool SchedulerStateMachine::CouldSendBeginMainFrame() const {}

bool SchedulerStateMachine::ShouldSendBeginMainFrame() const {}

bool SchedulerStateMachine::ShouldCommit() const {}

void SchedulerStateMachine::DidCommit() {}

bool SchedulerStateMachine::ShouldRunPostCommit() const {}

void SchedulerStateMachine::DidPostCommit() {}

bool SchedulerStateMachine::ShouldPrepareTiles() const {}

bool SchedulerStateMachine::ShouldInvalidateLayerTreeFrameSink() const {}

SchedulerStateMachine::Action SchedulerStateMachine::NextAction() const {}

bool SchedulerStateMachine::ShouldPerformImplSideInvalidation() const {}

bool SchedulerStateMachine::ShouldDeferInvalidatingForMainFrame() const {}

void SchedulerStateMachine::WillPerformImplSideInvalidation() {}

void SchedulerStateMachine::WillPerformImplSideInvalidationInternal() {}

bool SchedulerStateMachine::CouldCreatePendingTree() const {}

void SchedulerStateMachine::WillSendBeginMainFrame() {}

void SchedulerStateMachine::WillNotifyBeginMainFrameNotExpectedUntil() {}

void SchedulerStateMachine::WillNotifyBeginMainFrameNotExpectedSoon() {}

void SchedulerStateMachine::WillCommit(bool commit_has_no_updates) {}

void SchedulerStateMachine::WillActivate() {}

void SchedulerStateMachine::WillDrawInternal() {}

void SchedulerStateMachine::DidDrawInternal(DrawResult draw_result) {}

void SchedulerStateMachine::WillDraw() {}

void SchedulerStateMachine::WillUpdateDisplayTree() {}

void SchedulerStateMachine::DidDraw(DrawResult draw_result) {}

void SchedulerStateMachine::SetNeedsImplSideInvalidation(
    bool needs_first_draw_on_activation) {}

void SchedulerStateMachine::SetMainThreadWantsBeginMainFrameNotExpectedMessages(
    bool new_state) {}

void SchedulerStateMachine::AbortDraw() {}

void SchedulerStateMachine::WillPrepareTiles() {}

void SchedulerStateMachine::WillBeginLayerTreeFrameSinkCreation() {}

void SchedulerStateMachine::WillInvalidateLayerTreeFrameSink() {}

bool SchedulerStateMachine::BeginFrameNeededForVideo() const {}

bool SchedulerStateMachine::BeginFrameNeeded() const {}

bool SchedulerStateMachine::ShouldSubscribeToBeginFrames() const {}

void SchedulerStateMachine::SetVideoNeedsBeginFrames(
    bool video_needs_begin_frames) {}

void SchedulerStateMachine::SetDeferBeginMainFrame(
    bool defer_begin_main_frame) {}

void SchedulerStateMachine::SetPauseRendering(bool pause_rendering) {}

// These are the cases where we require a BeginFrame message to make progress
// on requested actions.
bool SchedulerStateMachine::BeginFrameRequiredForAction() const {}

// These are cases where we are very likely want a BeginFrame message in the
// near future. Proactively requesting the BeginImplFrame helps hide the round
// trip latency of the SetNeedsBeginFrame request that has to go to the
// Browser.
// This includes things like drawing soon, but might not actually have a new
// frame to draw when we receive the next BeginImplFrame.
bool SchedulerStateMachine::ProactiveBeginFrameWanted() const {}

void SchedulerStateMachine::OnBeginImplFrame(const viz::BeginFrameId& frame_id,
                                             bool animate_only) {}

void SchedulerStateMachine::OnBeginImplFrameDeadline() {}

void SchedulerStateMachine::OnBeginImplFrameIdle() {}

SchedulerStateMachine::BeginImplFrameDeadlineMode
SchedulerStateMachine::CurrentBeginImplFrameDeadlineMode() const {}

bool SchedulerStateMachine::ShouldWaitForScrollEvent() const {}

bool SchedulerStateMachine::ShouldTriggerBeginImplFrameDeadlineImmediately()
    const {}

bool SchedulerStateMachine::ShouldBlockDeadlineIndefinitely() const {}

bool SchedulerStateMachine::IsDrawThrottled() const {}

void SchedulerStateMachine::SetVisible(bool visible) {}

void SchedulerStateMachine::SetShouldWarmUp() {}

void SchedulerStateMachine::SetBeginFrameSourcePaused(bool paused) {}

void SchedulerStateMachine::SetResourcelessSoftwareDraw(
    bool resourceless_draw) {}

void SchedulerStateMachine::SetCanDraw(bool can_draw) {}

void SchedulerStateMachine::SetSkipDraw(bool skip_draw) {}

void SchedulerStateMachine::SetNeedsRedraw() {}

void SchedulerStateMachine::SetNeedsUpdateDisplayTree() {}

void SchedulerStateMachine::SetNeedsPrepareTiles() {}
void SchedulerStateMachine::DidSubmitCompositorFrame() {}

void SchedulerStateMachine::DidReceiveCompositorFrameAck() {}

void SchedulerStateMachine::SetTreePrioritiesAndScrollState(
    TreePriority tree_priority,
    ScrollHandlerState scroll_handler_state) {}

void SchedulerStateMachine::SetCriticalBeginMainFrameToActivateIsFast(
    bool is_fast) {}

bool SchedulerStateMachine::ImplLatencyTakesPriority() const {}

void SchedulerStateMachine::SetNeedsBeginMainFrame() {}

void SchedulerStateMachine::SetNeedsOneBeginImplFrame() {}

void SchedulerStateMachine::NotifyReadyToCommit() {}

void SchedulerStateMachine::BeginMainFrameAborted(CommitEarlyOutReason reason) {}

void SchedulerStateMachine::DidPrepareTiles() {}

void SchedulerStateMachine::DidLoseLayerTreeFrameSink() {}

bool SchedulerStateMachine::NotifyReadyToActivate() {}

bool SchedulerStateMachine::IsReadyToActivate() {}

void SchedulerStateMachine::NotifyReadyToDraw() {}

void SchedulerStateMachine::NotifyAnimationWorkletStateChange(
    AnimationWorkletState state,
    TreeType tree) {}

void SchedulerStateMachine::NotifyPaintWorkletStateChange(
    PaintWorkletState state) {}

void SchedulerStateMachine::DidCreateAndInitializeLayerTreeFrameSink() {}

bool SchedulerStateMachine::HasInitializedLayerTreeFrameSink() const {}

}  // namespace cc