Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(442)

Side by Side Diff: sky/engine/core/animation/InterpolationEffect.h

Issue 1229273004: Remove Animations and Transitions. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SKY_ENGINE_CORE_ANIMATION_INTERPOLATIONEFFECT_H_
6 #define SKY_ENGINE_CORE_ANIMATION_INTERPOLATIONEFFECT_H_
7
8 #include "sky/engine/core/animation/Interpolation.h"
9 #include "sky/engine/platform/animation/TimingFunction.h"
10 #include "sky/engine/wtf/PassOwnPtr.h"
11 #include "sky/engine/wtf/RefCounted.h"
12
13 namespace blink {
14
15 class InterpolationEffect : public RefCounted<InterpolationEffect> {
16 public:
17 static PassRefPtr<InterpolationEffect> create() { return adoptRef(new Interp olationEffect()); }
18
19 PassOwnPtr<Vector<RefPtr<Interpolation> > > getActiveInterpolations(double f raction, double iterationDuration) const;
20
21 void addInterpolation(PassRefPtr<Interpolation> interpolation, PassRefPtr<Ti mingFunction> easing, double start, double end, double applyFrom, double applyTo )
22 {
23 m_interpolations.append(InterpolationRecord::create(interpolation, easin g, start, end, applyFrom, applyTo));
24 }
25
26 private:
27 InterpolationEffect()
28 {
29 }
30
31 class InterpolationRecord {
32 public:
33 RefPtr<Interpolation> m_interpolation;
34 RefPtr<TimingFunction> m_easing;
35 double m_start;
36 double m_end;
37 double m_applyFrom;
38 double m_applyTo;
39
40 static PassOwnPtr<InterpolationRecord> create(PassRefPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double start, double end, doub le applyFrom, double applyTo)
41 {
42 return adoptPtr(new InterpolationRecord(interpolation, easing, start , end, applyFrom, applyTo));
43 }
44
45 private:
46 InterpolationRecord(PassRefPtr<Interpolation> interpolation, PassRefPtr< TimingFunction> easing, double start, double end, double applyFrom, double apply To)
47 : m_interpolation(interpolation)
48 , m_easing(easing)
49 , m_start(start)
50 , m_end(end)
51 , m_applyFrom(applyFrom)
52 , m_applyTo(applyTo)
53 {
54 }
55 };
56
57 Vector<OwnPtr<InterpolationRecord> > m_interpolations;
58 };
59
60 }
61
62 #endif // SKY_ENGINE_CORE_ANIMATION_INTERPOLATIONEFFECT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/animation/Interpolation.cpp ('k') | sky/engine/core/animation/InterpolationEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698