| 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 InterpolationEffect_h | 5 #ifndef InterpolationEffect_h |
| 6 #define InterpolationEffect_h | 6 #define InterpolationEffect_h |
| 7 | 7 |
| 8 #include "core/animation/Interpolation.h" | 8 #include "core/animation/Interpolation.h" |
| 9 #include "platform/animation/TimingFunction.h" | 9 #include "platform/animation/TimingFunction.h" |
| 10 #include "wtf/PassOwnPtr.h" | 10 #include "wtf/PassOwnPtr.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 | 21 |
| 22 void getActiveInterpolations(double fraction, double iterationDuration, OwnP
trWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>>&) const; | 22 void getActiveInterpolations(double fraction, double iterationDuration, OwnP
trWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>>&) const; |
| 23 | 23 |
| 24 void addInterpolation(PassRefPtrWillBeRawPtr<Interpolation> interpolation, P
assRefPtr<TimingFunction> easing, double start, double end, double applyFrom, do
uble applyTo) | 24 void addInterpolation(PassRefPtrWillBeRawPtr<Interpolation> interpolation, P
assRefPtr<TimingFunction> easing, double start, double end, double applyFrom, do
uble applyTo) |
| 25 { | 25 { |
| 26 m_interpolations.append(InterpolationRecord::create(interpolation, easin
g, start, end, applyFrom, applyTo)); | 26 m_interpolations.append(InterpolationRecord::create(interpolation, easin
g, start, end, applyFrom, applyTo)); |
| 27 } | 27 } |
| 28 | 28 |
| 29 void trace(Visitor*); | 29 void trace(Visitor*); |
| 30 | 30 |
| 31 private: |
| 32 InterpolationEffect() |
| 33 { |
| 34 } |
| 35 |
| 31 class InterpolationRecord : public NoBaseWillBeGarbageCollectedFinalized<Int
erpolationRecord> { | 36 class InterpolationRecord : public NoBaseWillBeGarbageCollectedFinalized<Int
erpolationRecord> { |
| 32 public: | 37 public: |
| 33 RefPtrWillBeMember<Interpolation> m_interpolation; | 38 RefPtrWillBeMember<Interpolation> m_interpolation; |
| 34 RefPtr<TimingFunction> m_easing; | 39 RefPtr<TimingFunction> m_easing; |
| 35 double m_start; | 40 double m_start; |
| 36 double m_end; | 41 double m_end; |
| 37 double m_applyFrom; | 42 double m_applyFrom; |
| 38 double m_applyTo; | 43 double m_applyTo; |
| 39 | 44 |
| 40 static PassOwnPtrWillBeRawPtr<InterpolationRecord> create(PassRefPtrWill
BeRawPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double
start, double end, double applyFrom, double applyTo) | 45 static PassOwnPtrWillBeRawPtr<InterpolationRecord> create(PassRefPtrWill
BeRawPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double
start, double end, double applyFrom, double applyTo) |
| 41 { | 46 { |
| 42 return adoptPtrWillBeNoop(new InterpolationRecord(interpolation, eas
ing, start, end, applyFrom, applyTo)); | 47 return adoptPtrWillBeNoop(new InterpolationRecord(interpolation, eas
ing, start, end, applyFrom, applyTo)); |
| 43 } | 48 } |
| 44 | 49 |
| 45 void trace(Visitor*); | 50 void trace(Visitor*); |
| 46 | 51 |
| 47 private: | 52 private: |
| 48 InterpolationRecord(PassRefPtrWillBeRawPtr<Interpolation> interpolation,
PassRefPtr<TimingFunction> easing, double start, double end, double applyFrom,
double applyTo) | 53 InterpolationRecord(PassRefPtrWillBeRawPtr<Interpolation> interpolation,
PassRefPtr<TimingFunction> easing, double start, double end, double applyFrom,
double applyTo) |
| 49 : m_interpolation(interpolation) | 54 : m_interpolation(interpolation) |
| 50 , m_easing(easing) | 55 , m_easing(easing) |
| 51 , m_start(start) | 56 , m_start(start) |
| 52 , m_end(end) | 57 , m_end(end) |
| 53 , m_applyFrom(applyFrom) | 58 , m_applyFrom(applyFrom) |
| 54 , m_applyTo(applyTo) | 59 , m_applyTo(applyTo) |
| 55 { | 60 { |
| 56 } | 61 } |
| 57 }; | 62 }; |
| 58 | 63 |
| 59 private: | |
| 60 InterpolationEffect() | |
| 61 { | |
| 62 } | |
| 63 | |
| 64 WillBeHeapVector<OwnPtrWillBeMember<InterpolationRecord> > m_interpolations; | 64 WillBeHeapVector<OwnPtrWillBeMember<InterpolationRecord> > m_interpolations; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 WILL_BE_EAGERLY_TRACED(InterpolationEffect); | |
| 68 WILL_BE_EAGERLY_TRACED(InterpolationEffect::InterpolationRecord); | |
| 69 | |
| 70 } // namespace blink | 67 } // namespace blink |
| 71 | 68 |
| 72 #endif // InterpolationEffect_h | 69 #endif // InterpolationEffect_h |
| OLD | NEW |