| 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" |
| 11 #include "wtf/RefCounted.h" | 11 #include "wtf/RefCounted.h" |
| 12 | 12 |
| 13 namespace WebCore { | 13 namespace WebCore { |
| 14 | 14 |
| 15 class InterpolationEffect : public RefCounted<InterpolationEffect> { | 15 class InterpolationEffect : public RefCounted<InterpolationEffect> { |
| 16 | 16 |
| 17 public: | 17 public: |
| 18 static PassRefPtr<InterpolationEffect> create() { return adoptRef(new Interp
olationEffect()); } | 18 static PassRefPtr<InterpolationEffect> create() { return adoptRef(new Interp
olationEffect()); } |
| 19 | 19 |
| 20 PassOwnPtr<Vector<RefPtr<Interpolation> > > getActiveInterpolations(double f
raction) const; | 20 PassOwnPtr<Vector<RefPtr<Interpolation> > > getActiveInterpolations(double f
raction, double iterationDuration) const; |
| 21 | 21 |
| 22 void addInterpolation(PassRefPtr<Interpolation> interpolation, PassRefPtr<Ti
mingFunction> easing, double start, double end, double applyFrom, double applyTo
) | 22 void addInterpolation(PassRefPtr<Interpolation> interpolation, PassRefPtr<Ti
mingFunction> easing, double start, double end, double applyFrom, double applyTo
) |
| 23 { | 23 { |
| 24 m_interpolations.append(InterpolationRecord::create(interpolation, easin
g, start, end, applyFrom, applyTo)); | 24 m_interpolations.append(InterpolationRecord::create(interpolation, easin
g, start, end, applyFrom, applyTo)); |
| 25 } | 25 } |
| 26 | 26 |
| 27 private: | 27 private: |
| 28 InterpolationEffect() | 28 InterpolationEffect() |
| 29 { } | 29 { } |
| 30 | 30 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 50 , m_applyTo(applyTo) | 50 , m_applyTo(applyTo) |
| 51 { } | 51 { } |
| 52 }; | 52 }; |
| 53 | 53 |
| 54 Vector<OwnPtr<InterpolationRecord> > m_interpolations; | 54 Vector<OwnPtr<InterpolationRecord> > m_interpolations; |
| 55 }; | 55 }; |
| 56 | 56 |
| 57 } | 57 } |
| 58 | 58 |
| 59 #endif | 59 #endif |
| OLD | NEW |