| Index: third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurve.h
|
| diff --git a/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurve.h b/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurve.h
|
| index 1598fe57f2de6b0e025b7e7879f7ec6f110dd387..dc7df7c48ac8034fa124290ad877138848765037 100644
|
| --- a/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurve.h
|
| +++ b/third_party/WebKit/Source/platform/animation/CompositorFloatAnimationCurve.h
|
| @@ -10,6 +10,7 @@
|
| #include "platform/animation/CompositorFloatKeyframe.h"
|
| #include "platform/animation/TimingFunction.h"
|
| #include "wtf/Noncopyable.h"
|
| +#include "wtf/Vector.h"
|
|
|
| namespace cc {
|
| class KeyframedFloatAnimationCurve;
|
| @@ -28,24 +29,35 @@ public:
|
| CompositorFloatAnimationCurve();
|
| ~CompositorFloatAnimationCurve() override;
|
|
|
| - virtual void addLinearKeyframe(const CompositorFloatKeyframe&);
|
| - virtual void addCubicBezierKeyframe(const CompositorFloatKeyframe&, CubicBezierTimingFunction::EaseType);
|
| + static PassOwnPtr<CompositorFloatAnimationCurve> CreateForTesting(std::unique_ptr<cc::KeyframedFloatAnimationCurve>);
|
| + Vector<CompositorFloatKeyframe> keyframesForTesting() const;
|
| +
|
| + // TODO(loyso): Erase these methods once blink/cc timing functions unified.
|
| + CubicBezierTimingFunction::EaseType getCurveEaseTypeForTesting() const;
|
| + bool curveHasLinearTimingFunctionForTesting() const;
|
| + CubicBezierTimingFunction::EaseType getKeyframeEaseTypeForTesting(unsigned long index) const;
|
| + bool keyframeHasLinearTimingFunctionForTesting(unsigned long index) const;
|
| +
|
| + void addLinearKeyframe(const CompositorFloatKeyframe&);
|
| + void addCubicBezierKeyframe(const CompositorFloatKeyframe&, CubicBezierTimingFunction::EaseType);
|
| // Adds the keyframe with a custom, bezier timing function. Note, it is
|
| // assumed that x0 = y0 , and x3 = y3 = 1.
|
| - virtual void addCubicBezierKeyframe(const CompositorFloatKeyframe&, double x1, double y1, double x2, double y2);
|
| - virtual void addStepsKeyframe(const CompositorFloatKeyframe&, int steps, StepsTimingFunction::StepPosition);
|
| + void addCubicBezierKeyframe(const CompositorFloatKeyframe&, double x1, double y1, double x2, double y2);
|
| + void addStepsKeyframe(const CompositorFloatKeyframe&, int steps, StepsTimingFunction::StepPosition);
|
|
|
| - virtual void setLinearTimingFunction();
|
| - virtual void setCubicBezierTimingFunction(CubicBezierTimingFunction::EaseType);
|
| - virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, double y2);
|
| - virtual void setStepsTimingFunction(int numberOfSteps, StepsTimingFunction::StepPosition);
|
| + void setLinearTimingFunction();
|
| + void setCubicBezierTimingFunction(CubicBezierTimingFunction::EaseType);
|
| + void setCubicBezierTimingFunction(double x1, double y1, double x2, double y2);
|
| + void setStepsTimingFunction(int numberOfSteps, StepsTimingFunction::StepPosition);
|
|
|
| - virtual float getValue(double time) const;
|
| + float getValue(double time) const;
|
|
|
| // CompositorAnimationCurve implementation.
|
| std::unique_ptr<cc::AnimationCurve> cloneToAnimationCurve() const override;
|
|
|
| private:
|
| + CompositorFloatAnimationCurve(std::unique_ptr<cc::KeyframedFloatAnimationCurve>);
|
| +
|
| std::unique_ptr<cc::KeyframedFloatAnimationCurve> m_curve;
|
| };
|
|
|
|
|