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

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

Issue 967523002: Revert of Web Animations: Remove AnimationPlayer discarding logic (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « Source/core/animation/AnimationStackTest.cpp ('k') | Source/core/animation/SampledEffect.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 void clear(); 24 void clear();
24 25
25 const WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& interpolations() const { return *m_interpolations; } 26 const WillBeHeapVector<RefPtrWillBeMember<Interpolation> >& interpolations() const { return *m_interpolations; }
26 #if ENABLE(OILPAN) 27 #if ENABLE(OILPAN)
27 RawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInterpola tions() { return m_interpolations.get(); } 28 RawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInterpola tions() { return m_interpolations.get(); }
28 #else 29 #else
29 PassOwnPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInter polations() { return m_interpolations.release(); } 30 PassOwnPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInter polations() { return m_interpolations.release(); }
30 #endif 31 #endif
31 32
32 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeM ember<Interpolation> > > interpolations) { m_interpolations = interpolations; } 33 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeM ember<Interpolation> > > interpolations) { m_interpolations = interpolations; }
33 34
34 Animation* animation() const { return m_animation; } 35 Animation* animation() const { return m_animation; }
35 unsigned sequenceNumber() const { return m_sequenceNumber; } 36 unsigned sequenceNumber() const { return m_sequenceNumber; }
36 Animation::Priority priority() const { return m_priority; } 37 Animation::Priority priority() const { return m_priority; }
37 38
39 void removeReplacedInterpolationsIfNeeded(const BitArray<numCSSProperties>&) ;
40
38 DECLARE_TRACE(); 41 DECLARE_TRACE();
39 42
40 private: 43 private:
41 SampledEffect(Animation*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWill BeMember<Interpolation> > >); 44 SampledEffect(Animation*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWill BeMember<Interpolation> > >);
42 45
43 RawPtrWillBeWeakMember<Animation> m_animation; 46 RawPtrWillBeWeakMember<Animation> m_animation;
44 RefPtrWillBeMember<AnimationPlayer> m_player; 47 #if !ENABLE(OILPAN)
48 RefPtr<AnimationPlayer> m_player;
49 #endif
45 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> m_in terpolations; 50 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> m_in terpolations;
46 const unsigned m_sequenceNumber; 51 const unsigned m_sequenceNumber;
47 Animation::Priority m_priority; 52 Animation::Priority m_priority;
48 }; 53 };
49 54
50 } // namespace blink 55 } // namespace blink
51 56
52 #endif // SampledEffect_h 57 #endif // SampledEffect_h
OLDNEW
« no previous file with comments | « Source/core/animation/AnimationStackTest.cpp ('k') | Source/core/animation/SampledEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698