#include "components/viz/service/display/frame_interval_decider.h"
#include <inttypes.h>
#include <utility>
#include "base/functional/overloaded.h"
#include "base/memory/ptr_util.h"
#include "base/trace_event/trace_event.h"
#include "base/trace_event/traced_value.h"
#include "components/viz/common/quads/frame_interval_inputs.h"
#include "components/viz/service/surfaces/surface.h"
#include "components/viz/service/surfaces/surface_manager.h"
namespace viz {
namespace {
std::unique_ptr<base::trace_event::TracedValue>
FrameIntervalMatcherInputsTracedValue(
const FrameIntervalMatcher::Inputs& inputs) { … }
}
FrameIntervalDecider::ScopedAggregate::ScopedAggregate(
FrameIntervalDecider& decider,
SurfaceManager& surface_manager,
base::TimeTicks frame_time)
: … { … }
FrameIntervalDecider::ScopedAggregate::~ScopedAggregate() { … }
void FrameIntervalDecider::ScopedAggregate::OnSurfaceWillBeDrawn(
Surface* surface) { … }
FrameIntervalDecider::FrameIntervalDecider() = default;
FrameIntervalDecider::~FrameIntervalDecider() = default;
void FrameIntervalDecider::UpdateSettings(
Settings settings,
std::vector<std::unique_ptr<FrameIntervalMatcher>> matchers) { … }
std::unique_ptr<FrameIntervalDecider::ScopedAggregate>
FrameIntervalDecider::WrapAggregate(SurfaceManager& surface_manager,
base::TimeTicks frame_time) { … }
void FrameIntervalDecider::Decide(
base::TimeTicks frame_time,
base::flat_map<FrameSinkId, FrameIntervalInputs> inputs_map) { … }
bool FrameIntervalDecider::MayDecreaseFrameInterval(
const std::optional<Result>& from,
const std::optional<Result>& to) { … }
}