| OLD | NEW |
| 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 SVGElement; | 16 class SVGElement; |
| 17 | 17 |
| 18 class SampledEffect : public NoBaseWillBeGarbageCollected<SampledEffect> { | 18 class SampledEffect : public GarbageCollectedFinalized<SampledEffect> { |
| 19 public: | 19 public: |
| 20 static PassOwnPtrWillBeRawPtr<SampledEffect> create(Animation* animation, Pa
ssOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> interp
olations) | 20 static SampledEffect* create(Animation* animation, HeapVector<Member<Interpo
lation>>* interpolations) |
| 21 { | 21 { |
| 22 return adoptPtrWillBeNoop(new SampledEffect(animation, interpolations)); | 22 return new SampledEffect(animation, interpolations); |
| 23 } | 23 } |
| 24 ~SampledEffect() { } |
| 24 | 25 |
| 25 void clear(); | 26 void clear(); |
| 26 | 27 |
| 27 const WillBeHeapVector<RefPtrWillBeMember<Interpolation>>& interpolations()
const { return *m_interpolations; } | 28 const HeapVector<Member<Interpolation>>& interpolations() const { return *m_
interpolations; } |
| 28 #if ENABLE(OILPAN) | 29 HeapVector<Member<Interpolation>>* mutableInterpolations() { return m_interp
olations; } |
| 29 RawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInterpola
tions() { return m_interpolations.get(); } | |
| 30 #else | |
| 31 PassOwnPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> mutableInter
polations() { return m_interpolations.release(); } | |
| 32 #endif | |
| 33 | 30 |
| 34 void setInterpolations(PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeM
ember<Interpolation>>> interpolations) { m_interpolations = interpolations; } | 31 void setInterpolations(HeapVector<Member<Interpolation>>* interpolations) {
m_interpolations = interpolations; } |
| 35 | 32 |
| 36 Animation* animation() const { return m_animation; } | 33 Animation* animation() const { return m_animation; } |
| 37 unsigned sequenceNumber() const { return m_sequenceNumber; } | 34 unsigned sequenceNumber() const { return m_sequenceNumber; } |
| 38 Animation::Priority priority() const { return m_priority; } | 35 Animation::Priority priority() const { return m_priority; } |
| 39 | 36 |
| 40 DECLARE_TRACE(); | 37 DECLARE_TRACE(); |
| 41 | 38 |
| 42 void applySVGUpdate(SVGElement&); | 39 void applySVGUpdate(SVGElement&); |
| 43 | 40 |
| 44 private: | 41 private: |
| 45 SampledEffect(Animation*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWill
BeMember<Interpolation>>>); | 42 SampledEffect(Animation*, HeapVector<Member<Interpolation>>*); |
| 46 | 43 |
| 47 RawPtrWillBeWeakMember<Animation> m_animation; | 44 WeakMember<Animation> m_animation; |
| 48 RefPtrWillBeMember<AnimationPlayer> m_player; | 45 RefPtrWillBeMember<AnimationPlayer> m_player; |
| 49 OwnPtrWillBeMember<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> m_in
terpolations; | 46 Member<HeapVector<Member<Interpolation>>> m_interpolations; |
| 50 const unsigned m_sequenceNumber; | 47 const unsigned m_sequenceNumber; |
| 51 Animation::Priority m_priority; | 48 Animation::Priority m_priority; |
| 52 }; | 49 }; |
| 53 | 50 |
| 54 } // namespace blink | 51 } // namespace blink |
| 55 | 52 |
| 56 #endif // SampledEffect_h | 53 #endif // SampledEffect_h |
| OLD | NEW |