#include "third_party/blink/renderer/core/animation/timing_calculations.h"
#include "base/metrics/histogram_macros.h"
namespace blink {
namespace {
inline bool EndsOnIterationBoundary(double iteration_count,
double iteration_start) { … }
void RecordBoundaryMisalignment(AnimationTimeDelta misalignment) { … }
}
double TimingCalculations::TimingCalculationEpsilon() { … }
AnimationTimeDelta TimingCalculations::TimeTolerance() { … }
bool TimingCalculations::IsWithinAnimationTimeEpsilon(double a, double b) { … }
bool TimingCalculations::IsWithinAnimationTimeTolerance(AnimationTimeDelta a,
AnimationTimeDelta b) { … }
bool TimingCalculations::LessThanOrEqualToWithinEpsilon(double a, double b) { … }
bool TimingCalculations::LessThanOrEqualToWithinTimeTolerance(
AnimationTimeDelta a,
AnimationTimeDelta b) { … }
bool TimingCalculations::GreaterThanOrEqualToWithinEpsilon(double a, double b) { … }
bool TimingCalculations::GreaterThanOrEqualToWithinTimeTolerance(
AnimationTimeDelta a,
AnimationTimeDelta b) { … }
bool TimingCalculations::GreaterThanWithinTimeTolerance(AnimationTimeDelta a,
AnimationTimeDelta b) { … }
double TimingCalculations::MultiplyZeroAlwaysGivesZero(double x, double y) { … }
AnimationTimeDelta TimingCalculations::MultiplyZeroAlwaysGivesZero(
AnimationTimeDelta x,
double y) { … }
Timing::Phase TimingCalculations::CalculatePhase(
const Timing::NormalizedTiming& normalized,
std::optional<AnimationTimeDelta>& local_time,
Timing::AnimationDirection direction) { … }
std::optional<AnimationTimeDelta> TimingCalculations::CalculateActiveTime(
const Timing::NormalizedTiming& normalized,
Timing::FillMode fill_mode,
std::optional<AnimationTimeDelta> local_time,
Timing::Phase phase) { … }
std::optional<double> TimingCalculations::CalculateOverallProgress(
Timing::Phase phase,
std::optional<AnimationTimeDelta> active_time,
AnimationTimeDelta iteration_duration,
double iteration_count,
double iteration_start) { … }
std::optional<double> TimingCalculations::CalculateSimpleIterationProgress(
Timing::Phase phase,
std::optional<double> overall_progress,
double iteration_start,
std::optional<AnimationTimeDelta> active_time,
AnimationTimeDelta active_duration,
double iteration_count) { … }
std::optional<double> TimingCalculations::CalculateCurrentIteration(
Timing::Phase phase,
std::optional<AnimationTimeDelta> active_time,
double iteration_count,
std::optional<double> overall_progress,
std::optional<double> simple_iteration_progress) { … }
bool TimingCalculations::IsCurrentDirectionForwards(
std::optional<double> current_iteration,
Timing::PlaybackDirection direction) { … }
std::optional<double> TimingCalculations::CalculateDirectedProgress(
std::optional<double> simple_iteration_progress,
std::optional<double> current_iteration,
Timing::PlaybackDirection direction) { … }
std::optional<double> TimingCalculations::CalculateTransformedProgress(
Timing::Phase phase,
std::optional<double> directed_progress,
bool is_current_direction_forward,
scoped_refptr<TimingFunction> timing_function) { … }
std::optional<AnimationTimeDelta> TimingCalculations::CalculateOffsetActiveTime(
AnimationTimeDelta active_duration,
std::optional<AnimationTimeDelta> active_time,
AnimationTimeDelta start_offset) { … }
std::optional<AnimationTimeDelta> TimingCalculations::CalculateIterationTime(
AnimationTimeDelta iteration_duration,
AnimationTimeDelta active_duration,
std::optional<AnimationTimeDelta> offset_active_time,
AnimationTimeDelta start_offset,
Timing::Phase phase,
const Timing& specified) { … }
}