Chromium Code Reviews| 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/Interpolation.h" | 9 #include "core/animation/Interpolation.h" |
| 10 #include "core/animation/KeyframeEffect.h" | 10 #include "core/animation/KeyframeEffect.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(KeyframeEffect* animatio n, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> i nterpolations) | 20 static SampledEffect* create(KeyframeEffect* animation, HeapVector<Member<In terpolation>>* 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.get(); } |
|
sof
2015/05/30 11:34:05
get() needed?
peria
2015/06/01 04:43:02
not needed.
peria
2015/06/01 04:43:02
Done.
| |
| 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 KeyframeEffect* effect() const { return m_effect; } | 33 KeyframeEffect* effect() const { return m_effect; } |
| 37 unsigned sequenceNumber() const { return m_sequenceNumber; } | 34 unsigned sequenceNumber() const { return m_sequenceNumber; } |
| 38 KeyframeEffect::Priority priority() const { return m_priority; } | 35 KeyframeEffect::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(KeyframeEffect*, PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPt rWillBeMember<Interpolation>>>); | 42 SampledEffect(KeyframeEffect*, HeapVector<Member<Interpolation>>*); |
| 46 | 43 |
| 47 RawPtrWillBeWeakMember<KeyframeEffect> m_effect; | 44 WeakMember<KeyframeEffect> m_effect; |
| 48 RefPtrWillBeMember<Animation> m_animation; | 45 Member<Animation> m_animation; |
| 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 KeyframeEffect::Priority m_priority; | 48 KeyframeEffect::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 |