OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 Interpolation_h | 5 #ifndef Interpolation_h |
6 #define Interpolation_h | 6 #define Interpolation_h |
7 | 7 |
8 #include "core/animation/InterpolableValue.h" | 8 #include "core/animation/InterpolableValue.h" |
9 #include "platform/heap/Handle.h" | 9 #include "platform/heap/Handle.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class Interpolation : public RefCountedWillBeGarbageCollected<Interpolation> { | 13 class Interpolation : public RefCountedWillBeGarbageCollectedFinalized<Interpola
tion> { |
14 DECLARE_EMPTY_VIRTUAL_DESTRUCTOR_WILL_BE_REMOVED(Interpolation); | |
15 public: | 14 public: |
16 static PassRefPtrWillBeRawPtr<Interpolation> create(PassOwnPtrWillBeRawPtr<I
nterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end) | 15 static PassRefPtrWillBeRawPtr<Interpolation> create(PassOwnPtrWillBeRawPtr<I
nterpolableValue> start, PassOwnPtrWillBeRawPtr<InterpolableValue> end) |
17 { | 16 { |
18 return adoptRefWillBeNoop(new Interpolation(start, end)); | 17 return adoptRefWillBeNoop(new Interpolation(start, end)); |
19 } | 18 } |
20 | 19 |
| 20 virtual ~Interpolation(); |
| 21 |
21 void interpolate(int iteration, double fraction) const; | 22 void interpolate(int iteration, double fraction) const; |
22 | 23 |
23 virtual bool isStyleInterpolation() const { return false; } | 24 virtual bool isStyleInterpolation() const { return false; } |
24 virtual bool isLegacyStyleInterpolation() const { return false; } | 25 virtual bool isLegacyStyleInterpolation() const { return false; } |
25 | 26 |
26 virtual void trace(Visitor*); | 27 virtual void trace(Visitor*); |
27 | 28 |
28 protected: | 29 protected: |
29 const OwnPtrWillBeMember<InterpolableValue> m_start; | 30 const OwnPtrWillBeMember<InterpolableValue> m_start; |
30 const OwnPtrWillBeMember<InterpolableValue> m_end; | 31 const OwnPtrWillBeMember<InterpolableValue> m_end; |
(...skipping 10 matching lines...) Expand all Loading... |
41 friend class AnimationInterpolableValueTest; | 42 friend class AnimationInterpolableValueTest; |
42 friend class AnimationInterpolationEffectTest; | 43 friend class AnimationInterpolationEffectTest; |
43 friend class AnimationDoubleStyleInterpolationTest; | 44 friend class AnimationDoubleStyleInterpolationTest; |
44 friend class AnimationVisibilityStyleInterpolationTest; | 45 friend class AnimationVisibilityStyleInterpolationTest; |
45 friend class AnimationColorStyleInterpolationTest; | 46 friend class AnimationColorStyleInterpolationTest; |
46 }; | 47 }; |
47 | 48 |
48 } // namespace blink | 49 } // namespace blink |
49 | 50 |
50 #endif // Interpolation_h | 51 #endif // Interpolation_h |
OLD | NEW |