| 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 | |
| 36 class InterpolationRecord : public NoBaseWillBeGarbageCollectedFinalized<Int
erpolationRecord> { | 31 class InterpolationRecord : public NoBaseWillBeGarbageCollectedFinalized<Int
erpolationRecord> { |
| 37 public: | 32 public: |
| 38 RefPtrWillBeMember<Interpolation> m_interpolation; | 33 RefPtrWillBeMember<Interpolation> m_interpolation; |
| 39 RefPtr<TimingFunction> m_easing; | 34 RefPtr<TimingFunction> m_easing; |
| 40 double m_start; | 35 double m_start; |
| 41 double m_end; | 36 double m_end; |
| 42 double m_applyFrom; | 37 double m_applyFrom; |
| 43 double m_applyTo; | 38 double m_applyTo; |
| 44 | 39 |
| 45 static PassOwnPtrWillBeRawPtr<InterpolationRecord> create(PassRefPtrWill
BeRawPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double
start, double end, double applyFrom, double applyTo) | 40 static PassOwnPtrWillBeRawPtr<InterpolationRecord> create(PassRefPtrWill
BeRawPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double
start, double end, double applyFrom, double applyTo) |
| 46 { | 41 { |
| 47 return adoptPtrWillBeNoop(new InterpolationRecord(interpolation, eas
ing, start, end, applyFrom, applyTo)); | 42 return adoptPtrWillBeNoop(new InterpolationRecord(interpolation, eas
ing, start, end, applyFrom, applyTo)); |
| 48 } | 43 } |
| 49 | 44 |
| 50 void trace(Visitor*); | 45 void trace(Visitor*); |
| 51 | 46 |
| 52 private: | 47 private: |
| 53 InterpolationRecord(PassRefPtrWillBeRawPtr<Interpolation> interpolation,
PassRefPtr<TimingFunction> easing, double start, double end, double applyFrom,
double applyTo) | 48 InterpolationRecord(PassRefPtrWillBeRawPtr<Interpolation> interpolation,
PassRefPtr<TimingFunction> easing, double start, double end, double applyFrom,
double applyTo) |
| 54 : m_interpolation(interpolation) | 49 : m_interpolation(interpolation) |
| 55 , m_easing(easing) | 50 , m_easing(easing) |
| 56 , m_start(start) | 51 , m_start(start) |
| 57 , m_end(end) | 52 , m_end(end) |
| 58 , m_applyFrom(applyFrom) | 53 , m_applyFrom(applyFrom) |
| 59 , m_applyTo(applyTo) | 54 , m_applyTo(applyTo) |
| 60 { | 55 { |
| 61 } | 56 } |
| 62 }; | 57 }; |
| 63 | 58 |
| 59 private: |
| 60 InterpolationEffect() |
| 61 { |
| 62 } |
| 63 |
| 64 WillBeHeapVector<OwnPtrWillBeMember<InterpolationRecord> > m_interpolations; | 64 WillBeHeapVector<OwnPtrWillBeMember<InterpolationRecord> > m_interpolations; |
| 65 }; | 65 }; |
| 66 | 66 |
| 67 } | 67 WILL_BE_EAGERLY_TRACED(InterpolationEffect); |
| 68 WILL_BE_EAGERLY_TRACED(InterpolationEffect::InterpolationRecord); |
| 68 | 69 |
| 69 #endif | 70 } // namespace blink |
| 71 |
| 72 #endif // InterpolationEffect_h |
| OLD | NEW |