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

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

Issue 723253004: Remove tons of OILPAN. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 1 month 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
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 blink { 13 namespace blink {
14 14
15 class InterpolationEffect : public RefCounted<InterpolationEffect> { 15 class InterpolationEffect : public RefCounted<InterpolationEffect> {
16 public: 16 public:
17 static PassRefPtr<InterpolationEffect> create() { return adoptRef(new Interp olationEffect()); } 17 static PassRefPtr<InterpolationEffect> create() { return adoptRef(new Interp olationEffect()); }
18 18
19 PassOwnPtr<Vector<RefPtr<Interpolation> > > getActiveInterpolations(double f raction, double iterationDuration) const; 19 PassOwnPtr<Vector<RefPtr<Interpolation> > > getActiveInterpolations(double f raction, double iterationDuration) const;
20 20
21 void addInterpolation(PassRefPtr<Interpolation> interpolation, PassRefPtr<Ti mingFunction> easing, double start, double end, double applyFrom, double applyTo ) 21 void addInterpolation(PassRefPtr<Interpolation> interpolation, PassRefPtr<Ti mingFunction> easing, double start, double end, double applyFrom, double applyTo )
22 { 22 {
23 m_interpolations.append(InterpolationRecord::create(interpolation, easin g, start, end, applyFrom, applyTo)); 23 m_interpolations.append(InterpolationRecord::create(interpolation, easin g, start, end, applyFrom, applyTo));
24 } 24 }
25 25
26 void trace(Visitor*);
27
28 private: 26 private:
29 InterpolationEffect() 27 InterpolationEffect()
30 { 28 {
31 } 29 }
32 30
33 class InterpolationRecord { 31 class InterpolationRecord {
34 public: 32 public:
35 RefPtr<Interpolation> m_interpolation; 33 RefPtr<Interpolation> m_interpolation;
36 RefPtr<TimingFunction> m_easing; 34 RefPtr<TimingFunction> m_easing;
37 double m_start; 35 double m_start;
38 double m_end; 36 double m_end;
39 double m_applyFrom; 37 double m_applyFrom;
40 double m_applyTo; 38 double m_applyTo;
41 39
42 static PassOwnPtr<InterpolationRecord> create(PassRefPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double start, double end, doub le applyFrom, double applyTo) 40 static PassOwnPtr<InterpolationRecord> create(PassRefPtr<Interpolation> interpolation, PassRefPtr<TimingFunction> easing, double start, double end, doub le applyFrom, double applyTo)
43 { 41 {
44 return adoptPtr(new InterpolationRecord(interpolation, easing, start , end, applyFrom, applyTo)); 42 return adoptPtr(new InterpolationRecord(interpolation, easing, start , end, applyFrom, applyTo));
45 } 43 }
46 44
47 void trace(Visitor*);
48
49 private: 45 private:
50 InterpolationRecord(PassRefPtr<Interpolation> interpolation, PassRefPtr< TimingFunction> easing, double start, double end, double applyFrom, double apply To) 46 InterpolationRecord(PassRefPtr<Interpolation> interpolation, PassRefPtr< TimingFunction> easing, double start, double end, double applyFrom, double apply To)
51 : m_interpolation(interpolation) 47 : m_interpolation(interpolation)
52 , m_easing(easing) 48 , m_easing(easing)
53 , m_start(start) 49 , m_start(start)
54 , m_end(end) 50 , m_end(end)
55 , m_applyFrom(applyFrom) 51 , m_applyFrom(applyFrom)
56 , m_applyTo(applyTo) 52 , m_applyTo(applyTo)
57 { 53 {
58 } 54 }
59 }; 55 };
60 56
61 Vector<OwnPtr<InterpolationRecord> > m_interpolations; 57 Vector<OwnPtr<InterpolationRecord> > m_interpolations;
62 }; 58 };
63 59
64 } 60 }
65 61
66 #endif 62 #endif
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