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

Side by Side Diff: Source/core/animation/SampledEffect.h

Issue 732153003: Update a result vector when sampling animation effects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.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 SampledEffect_h 5 #ifndef SampledEffect_h
6 #define SampledEffect_h 6 #define SampledEffect_h
7 7
8 #include "core/animation/Animation.h" 8 #include "core/animation/Animation.h"
9 #include "core/animation/AnimationPlayer.h" 9 #include "core/animation/AnimationPlayer.h"
10 #include "core/animation/Interpolation.h" 10 #include "core/animation/Interpolation.h"
11 #include "wtf/BitArray.h" 11 #include "wtf/BitArray.h"
12 #include "wtf/Vector.h" 12 #include "wtf/Vector.h"
13 13
14 namespace blink { 14 namespace blink {
15 15
16 class SampledEffect : public NoBaseWillBeGarbageCollected<SampledEffect> { 16 class SampledEffect : public NoBaseWillBeGarbageCollected<SampledEffect> {
17 public: 17 public:
18 static PassOwnPtrWillBeRawPtr<SampledEffect> create(Animation* animation, Pa ssOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > inte rpolations) 18 static PassOwnPtrWillBeRawPtr<SampledEffect> create(Animation* animation, Pa ssOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > inte rpolations)
19 { 19 {
20 return adoptPtrWillBeNoop(new SampledEffect(animation, interpolations)); 20 return adoptPtrWillBeNoop(new SampledEffect(animation, interpolations));
21 } 21 }
22 22
23 bool canChange() const; 23 bool canChange() const;
24 void clear(); 24 void clear();
25 25
26 const WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& interpolations() const { return *m_interpolations; } 26 const WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& interpolations() const { return *m_interpolations; }
27 #if ENABLE(OILPAN)
28 RawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInterpola tions() { return m_interpolations.get(); }
29 #else
30 PassOwnPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInter polations() { return m_interpolations.release(); }
31 #endif
32
27 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeM ember<Interpolation> > > interpolations) { m_interpolations = interpolations; } 33 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeM ember<Interpolation> > > interpolations) { m_interpolations = interpolations; }
28 34
29 Animation* animation() const { return m_animation; } 35 Animation* animation() const { return m_animation; }
30 unsigned sequenceNumber() const { return m_sequenceNumber; } 36 unsigned sequenceNumber() const { return m_sequenceNumber; }
31 Animation::Priority priority() const { return m_priority; } 37 Animation::Priority priority() const { return m_priority; }
32 38
33 void removeReplacedInterpolationsIfNeeded(const BitArray<numCSSProperties>&) ; 39 void removeReplacedInterpolationsIfNeeded(const BitArray<numCSSProperties>&) ;
34 40
35 void trace(Visitor*); 41 void trace(Visitor*);
36 42
37 private: 43 private:
38 SampledEffect(Animation*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWill BeMember<Interpolation> > >); 44 SampledEffect(Animation*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWill BeMember<Interpolation> > >);
39 45
40 RawPtrWillBeWeakMember<Animation> m_animation; 46 RawPtrWillBeWeakMember<Animation> m_animation;
41 #if !ENABLE(OILPAN) 47 #if !ENABLE(OILPAN)
42 RefPtr<AnimationPlayer> m_player; 48 RefPtr<AnimationPlayer> m_player;
43 #endif 49 #endif
44 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > m_ interpolations; 50 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> m_in terpolations;
45 const unsigned m_sequenceNumber; 51 const unsigned m_sequenceNumber;
46 Animation::Priority m_priority; 52 Animation::Priority m_priority;
47 }; 53 };
48 54
49 } // namespace blink 55 } // namespace blink
50 56
51 #endif 57 #endif
OLDNEW
« no previous file with comments | « Source/core/animation/KeyframeEffectModelTest.cpp ('k') | Source/core/animation/css/CSSAnimations.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698