| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CompositorFilterAnimationCurve_h | 5 #ifndef CompositorFilterAnimationCurve_h |
| 6 #define CompositorFilterAnimationCurve_h | 6 #define CompositorFilterAnimationCurve_h |
| 7 | 7 |
| 8 #include "platform/PlatformExport.h" | 8 #include "platform/PlatformExport.h" |
| 9 #include "platform/animation/CompositorAnimationCurve.h" | 9 #include "platform/animation/CompositorAnimationCurve.h" |
| 10 #include "platform/animation/CompositorFilterKeyframe.h" | 10 #include "platform/animation/CompositorFilterKeyframe.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 namespace blink { | 22 namespace blink { |
| 23 | 23 |
| 24 // A keyframed filter animation curve. | 24 // A keyframed filter animation curve. |
| 25 class PLATFORM_EXPORT CompositorFilterAnimationCurve : public CompositorAnimatio
nCurve { | 25 class PLATFORM_EXPORT CompositorFilterAnimationCurve : public CompositorAnimatio
nCurve { |
| 26 WTF_MAKE_NONCOPYABLE(CompositorFilterAnimationCurve); | 26 WTF_MAKE_NONCOPYABLE(CompositorFilterAnimationCurve); |
| 27 public: | 27 public: |
| 28 CompositorFilterAnimationCurve(); | 28 CompositorFilterAnimationCurve(); |
| 29 ~CompositorFilterAnimationCurve() override; | 29 ~CompositorFilterAnimationCurve() override; |
| 30 | 30 |
| 31 virtual void addLinearKeyframe(const CompositorFilterKeyframe&); | 31 void addLinearKeyframe(const CompositorFilterKeyframe&); |
| 32 virtual void addCubicBezierKeyframe(const CompositorFilterKeyframe&, CubicBe
zierTimingFunction::EaseType); | 32 void addCubicBezierKeyframe(const CompositorFilterKeyframe&, CubicBezierTimi
ngFunction::EaseType); |
| 33 // Adds the keyframe with a custom, bezier timing function. Note, it is | 33 // Adds the keyframe with a custom, bezier timing function. Note, it is |
| 34 // assumed that x0 = y0, and x3 = y3 = 1. | 34 // assumed that x0 = y0, and x3 = y3 = 1. |
| 35 virtual void addCubicBezierKeyframe(const CompositorFilterKeyframe&, double
x1, double y1, double x2, double y2); | 35 void addCubicBezierKeyframe(const CompositorFilterKeyframe&, double x1, doub
le y1, double x2, double y2); |
| 36 virtual void addStepsKeyframe(const CompositorFilterKeyframe&, int steps, St
epsTimingFunction::StepPosition); | 36 void addStepsKeyframe(const CompositorFilterKeyframe&, int steps, StepsTimin
gFunction::StepPosition); |
| 37 | 37 |
| 38 virtual void setLinearTimingFunction(); | 38 void setLinearTimingFunction(); |
| 39 virtual void setCubicBezierTimingFunction(CubicBezierTimingFunction::EaseTyp
e); | 39 void setCubicBezierTimingFunction(CubicBezierTimingFunction::EaseType); |
| 40 virtual void setCubicBezierTimingFunction(double x1, double y1, double x2, d
ouble y2); | 40 void setCubicBezierTimingFunction(double x1, double y1, double x2, double y2
); |
| 41 virtual void setStepsTimingFunction(int numberOfSteps, StepsTimingFunction::
StepPosition); | 41 void setStepsTimingFunction(int numberOfSteps, StepsTimingFunction::StepPosi
tion); |
| 42 | 42 |
| 43 // blink::CompositorAnimationCurve implementation. | 43 // blink::CompositorAnimationCurve implementation. |
| 44 std::unique_ptr<cc::AnimationCurve> cloneToAnimationCurve() const override; | 44 std::unique_ptr<cc::AnimationCurve> cloneToAnimationCurve() const override; |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 std::unique_ptr<cc::KeyframedFilterAnimationCurve> m_curve; | 47 std::unique_ptr<cc::KeyframedFilterAnimationCurve> m_curve; |
| 48 }; | 48 }; |
| 49 | 49 |
| 50 } // namespace blink | 50 } // namespace blink |
| 51 | 51 |
| 52 #endif // CompositorFilterAnimationCurve_h | 52 #endif // CompositorFilterAnimationCurve_h |
| OLD | NEW |