#include "components/viz/service/display/frame_interval_matchers.h"
#include <algorithm>
#include "base/functional/overloaded.h"
#include "base/strings/stringprintf.h"
#include "media/filters/video_cadence_estimator.h"
namespace viz {
namespace {
std::optional<FrameIntervalMatcher::Result> MatchContentIntervalType(
const FrameIntervalMatcher::Inputs& matcher_inputs,
ContentFrameIntervalType type) { … }
}
FrameIntervalMatcher::FixedIntervalSettings::FixedIntervalSettings() = default;
FrameIntervalMatcher::FixedIntervalSettings::FixedIntervalSettings(
const FixedIntervalSettings&) = default;
FrameIntervalMatcher::FixedIntervalSettings::~FixedIntervalSettings() = default;
FrameIntervalMatcher::ContinuousRangeSettings::ContinuousRangeSettings() =
default;
FrameIntervalMatcher::ContinuousRangeSettings::ContinuousRangeSettings(
const ContinuousRangeSettings&) = default;
FrameIntervalMatcher::ContinuousRangeSettings::~ContinuousRangeSettings() =
default;
FrameIntervalMatcher::Settings::Settings() = default;
FrameIntervalMatcher::Settings::~Settings() = default;
FrameIntervalMatcher::Settings::Settings(const Settings& other) = default;
FrameIntervalMatcher::Settings& FrameIntervalMatcher::Settings::operator=(
const Settings& other) = default;
FrameIntervalMatcher::Settings::Settings(Settings&& other) = default;
FrameIntervalMatcher::Settings& FrameIntervalMatcher::Settings::operator=(
Settings&& other) = default;
FrameIntervalMatcher::Inputs::Inputs(const Settings& settings)
: … { … }
FrameIntervalMatcher::Inputs::~Inputs() = default;
FrameIntervalMatcher::Inputs::Inputs(const Inputs& other) = default;
FrameIntervalMatcher::Inputs& FrameIntervalMatcher::Inputs::operator=(
const Inputs& other) = default;
std::string FrameIntervalMatcher::ResultToString(const Result& result) { … }
std::string FrameIntervalMatcher::MatcherTypeToString(
FrameIntervalMatcherType type) { … }
bool FrameIntervalMatcher::AreAlmostEqual(base::TimeDelta a,
base::TimeDelta b,
base::TimeDelta epsilon) { … }
FrameIntervalMatcher::FrameIntervalMatcher(FrameIntervalMatcherType type)
: … { … }
#define DefineSimpleMatcherConstructorDestructor(ClassName, MatcherType) …
DefineSimpleMatcherConstructorDestructor(…) …;
std::optional<FrameIntervalMatcher::Result> InputBoostMatcher::Match(
const Inputs& matcher_inputs) { … }
DefineSimpleMatcherConstructorDestructor(…) …;
std::optional<FrameIntervalMatcher::Result> OnlyVideoMatcher::Match(
const Inputs& matcher_inputs) { … }
DefineSimpleMatcherConstructorDestructor(…) …;
std::optional<FrameIntervalMatcher::Result> VideoConferenceMatcher::Match(
const Inputs& matcher_inputs) { … }
DefineSimpleMatcherConstructorDestructor(…) …;
std::optional<FrameIntervalMatcher::Result> OnlyAnimatingImageMatcher::Match(
const Inputs& matcher_inputs) { … }
DefineSimpleMatcherConstructorDestructor(…) …;
std::optional<FrameIntervalMatcher::Result>
OnlyScrollBarFadeOutAnimationMatcher::Match(const Inputs& matcher_inputs) { … }
}