#include "ui/gfx/animation/keyframe/timing_function.h"
#include <algorithm>
#include <cmath>
#include <memory>
#include "base/check_op.h"
#include "base/memory/ptr_util.h"
#include "base/notreached.h"
namespace gfx {
TimingFunction::TimingFunction() = default;
TimingFunction::~TimingFunction() = default;
std::unique_ptr<CubicBezierTimingFunction>
CubicBezierTimingFunction::CreatePreset(EaseType ease_type) { … }
std::unique_ptr<CubicBezierTimingFunction>
CubicBezierTimingFunction::Create(double x1, double y1, double x2, double y2) { … }
CubicBezierTimingFunction::CubicBezierTimingFunction(EaseType ease_type,
double x1,
double y1,
double x2,
double y2)
: … { … }
CubicBezierTimingFunction::~CubicBezierTimingFunction() = default;
TimingFunction::Type CubicBezierTimingFunction::GetType() const { … }
double CubicBezierTimingFunction::GetValue(
double x,
TimingFunction::LimitDirection) const { … }
double CubicBezierTimingFunction::Velocity(double x) const { … }
std::unique_ptr<TimingFunction> CubicBezierTimingFunction::Clone() const { … }
std::unique_ptr<StepsTimingFunction> StepsTimingFunction::Create(
int steps,
StepPosition step_position) { … }
StepsTimingFunction::StepsTimingFunction(int steps, StepPosition step_position)
: … { … }
StepsTimingFunction::~StepsTimingFunction() = default;
TimingFunction::Type StepsTimingFunction::GetType() const { … }
std::unique_ptr<TimingFunction> StepsTimingFunction::Clone() const { … }
double StepsTimingFunction::Velocity(double x) const { … }
double StepsTimingFunction::GetValue(double t, LimitDirection direction) const { … }
int StepsTimingFunction::NumberOfJumps() const { … }
float StepsTimingFunction::GetStepsStartOffset() const { … }
LinearTimingFunction::LinearTimingFunction() = default;
LinearTimingFunction::LinearTimingFunction(
std::vector<LinearEasingPoint> points)
: … { … }
LinearTimingFunction::~LinearTimingFunction() = default;
LinearTimingFunction::LinearTimingFunction(const LinearTimingFunction& other) { … }
std::unique_ptr<LinearTimingFunction> LinearTimingFunction::Create() { … }
std::unique_ptr<LinearTimingFunction> LinearTimingFunction::Create(
std::vector<LinearEasingPoint> points) { … }
TimingFunction::Type LinearTimingFunction::GetType() const { … }
std::unique_ptr<TimingFunction> LinearTimingFunction::Clone() const { … }
double LinearTimingFunction::Velocity(double x) const { … }
double LinearTimingFunction::GetValue(double input_progress,
LimitDirection limit_direction) const { … }
}