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 CompositorFloatAnimationCurve_h | 5 #ifndef CompositorFloatAnimationCurve_h |
6 #define CompositorFloatAnimationCurve_h | 6 #define CompositorFloatAnimationCurve_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/CompositorFloatKeyframe.h" | 10 #include "platform/animation/CompositorFloatKeyframe.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 | 25 |
26 namespace blink { | 26 namespace blink { |
27 | 27 |
28 // A keyframed float animation curve. | 28 // A keyframed float animation curve. |
29 class PLATFORM_EXPORT CompositorFloatAnimationCurve | 29 class PLATFORM_EXPORT CompositorFloatAnimationCurve |
30 : public CompositorAnimationCurve { | 30 : public CompositorAnimationCurve { |
31 WTF_MAKE_NONCOPYABLE(CompositorFloatAnimationCurve); | 31 WTF_MAKE_NONCOPYABLE(CompositorFloatAnimationCurve); |
32 | 32 |
33 public: | 33 public: |
34 static std::unique_ptr<CompositorFloatAnimationCurve> create() { | 34 static std::unique_ptr<CompositorFloatAnimationCurve> create() { |
35 return wrapUnique(new CompositorFloatAnimationCurve()); | 35 return WTF::wrapUnique(new CompositorFloatAnimationCurve()); |
36 } | 36 } |
37 | 37 |
38 ~CompositorFloatAnimationCurve() override; | 38 ~CompositorFloatAnimationCurve() override; |
39 | 39 |
40 void addKeyframe(const CompositorFloatKeyframe&); | 40 void addKeyframe(const CompositorFloatKeyframe&); |
41 void setTimingFunction(const TimingFunction&); | 41 void setTimingFunction(const TimingFunction&); |
42 void setScaledDuration(double); | 42 void setScaledDuration(double); |
43 float getValue(double time) const; | 43 float getValue(double time) const; |
44 | 44 |
45 // CompositorAnimationCurve implementation. | 45 // CompositorAnimationCurve implementation. |
(...skipping 11 matching lines...) Expand all Loading... |
57 CompositorFloatAnimationCurve(); | 57 CompositorFloatAnimationCurve(); |
58 CompositorFloatAnimationCurve( | 58 CompositorFloatAnimationCurve( |
59 std::unique_ptr<cc::KeyframedFloatAnimationCurve>); | 59 std::unique_ptr<cc::KeyframedFloatAnimationCurve>); |
60 | 60 |
61 std::unique_ptr<cc::KeyframedFloatAnimationCurve> m_curve; | 61 std::unique_ptr<cc::KeyframedFloatAnimationCurve> m_curve; |
62 }; | 62 }; |
63 | 63 |
64 } // namespace blink | 64 } // namespace blink |
65 | 65 |
66 #endif // CompositorFloatAnimationCurve_h | 66 #endif // CompositorFloatAnimationCurve_h |
OLD | NEW |