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

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

Issue 1120003002: [Oilpan] Migrate most classes under core/animations to Oilpan heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 5 years, 4 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
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/Interpolation.h" 9 #include "core/animation/Interpolation.h"
10 #include "core/animation/KeyframeEffect.h" 10 #include "core/animation/KeyframeEffect.h"
11 #include "wtf/Allocator.h" 11 #include "wtf/Allocator.h"
12 #include "wtf/BitArray.h" 12 #include "wtf/BitArray.h"
13 #include "wtf/Vector.h" 13 #include "wtf/Vector.h"
14 14
15 namespace blink { 15 namespace blink {
16 16
17 class SVGElement; 17 class SVGElement;
18 18
19 class SampledEffect : public NoBaseWillBeGarbageCollected<SampledEffect> { 19 class SampledEffect : public GarbageCollectedFinalized<SampledEffect> {
20 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(SampledEffect);
21 WTF_MAKE_NONCOPYABLE(SampledEffect); 20 WTF_MAKE_NONCOPYABLE(SampledEffect);
22 public: 21 public:
23 static PassOwnPtrWillBeRawPtr<SampledEffect> create(KeyframeEffect* animatio n, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> i nterpolations) 22 static SampledEffect* create(KeyframeEffect* animation, HeapVector<Member<In terpolation>>* interpolations)
24 { 23 {
25 return adoptPtrWillBeNoop(new SampledEffect(animation, interpolations)); 24 return new SampledEffect(animation, interpolations);
26 } 25 }
26 ~SampledEffect() { }
27 27
28 void clear(); 28 void clear();
29 29
30 const WillBeHeapVector<RefPtrWillBeMember<Interpolation>>& interpolations() const { return *m_interpolations; } 30 const HeapVector<Member<Interpolation>>& interpolations() const { return *m_ interpolations; }
31 #if ENABLE(OILPAN) 31 HeapVector<Member<Interpolation>>* mutableInterpolations() { return m_interp olations; }
32 RawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInterpola tions() { return m_interpolations.get(); }
33 #else
34 PassOwnPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInter polations() { return m_interpolations.release(); }
35 #endif
36 32
37 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeM ember<Interpolation>>> interpolations) { m_interpolations = interpolations; } 33 void setInterpolations(HeapVector<Member<Interpolation>>* interpolations) { m_interpolations = interpolations; }
38 34
39 KeyframeEffect* effect() const { return m_effect; } 35 KeyframeEffect* effect() const { return m_effect; }
40 unsigned sequenceNumber() const { return m_sequenceNumber; } 36 unsigned sequenceNumber() const { return m_sequenceNumber; }
41 KeyframeEffect::Priority priority() const { return m_priority; } 37 KeyframeEffect::Priority priority() const { return m_priority; }
42 38
43 DECLARE_TRACE(); 39 DECLARE_TRACE();
44 40
45 void applySVGUpdate(SVGElement&); 41 void applySVGUpdate(SVGElement&);
46 42
47 private: 43 private:
48 SampledEffect(KeyframeEffect*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPt rWillBeMember<Interpolation>>>); 44 SampledEffect(KeyframeEffect*, HeapVector<Member<Interpolation>>*);
49 45
50 RawPtrWillBeWeakMember<KeyframeEffect> m_effect; 46 WeakMember<KeyframeEffect> m_effect;
51 RefPtrWillBeMember<Animation> m_animation; 47 Member<Animation> m_animation;
52 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> m_in terpolations; 48 Member<HeapVector<Member<Interpolation>>> m_interpolations;
53 const unsigned m_sequenceNumber; 49 const unsigned m_sequenceNumber;
54 KeyframeEffect::Priority m_priority; 50 KeyframeEffect::Priority m_priority;
55 }; 51 };
56 52
57 } // namespace blink 53 } // namespace blink
58 54
59 #endif // SampledEffect_h 55 #endif // SampledEffect_h
OLDNEW
« no previous file with comments | « Source/core/animation/SVGStrokeDasharrayStyleInterpolationTest.cpp ('k') | Source/core/animation/SampledEffect.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698