Commit 1359cc5a authored by haraken@chromium.org's avatar haraken@chromium.org

Move InterpolationEffect to oilpan's heap

BUG=341032

Review URL: https://codereview.chromium.org/210823003

git-svn-id: svn://svn.chromium.org/blink/trunk@169942 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 01fcc90d
...@@ -32,4 +32,11 @@ void InterpolationEffect::InterpolationRecord::trace(Visitor* visitor) ...@@ -32,4 +32,11 @@ void InterpolationEffect::InterpolationRecord::trace(Visitor* visitor)
visitor->trace(m_interpolation); visitor->trace(m_interpolation);
} }
void InterpolationEffect::trace(Visitor* visitor)
{
#if ENABLE_OILPAN
visitor->trace(m_interpolations);
#endif
}
} }
...@@ -12,9 +12,9 @@ ...@@ -12,9 +12,9 @@
namespace WebCore { namespace WebCore {
class InterpolationEffect : public RefCounted<InterpolationEffect> { class InterpolationEffect : public RefCountedWillBeGarbageCollected<InterpolationEffect> {
public: public:
static PassRefPtr<InterpolationEffect> create() { return adoptRef(new InterpolationEffect()); } static PassRefPtrWillBeRawPtr<InterpolationEffect> create() { return adoptRefWillBeNoop(new InterpolationEffect()); }
PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > getActiveInterpolations(double fraction, double iterationDuration) const; PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > getActiveInterpolations(double fraction, double iterationDuration) const;
...@@ -23,6 +23,8 @@ public: ...@@ -23,6 +23,8 @@ public:
m_interpolations.append(InterpolationRecord::create(interpolation, easing, start, end, applyFrom, applyTo)); m_interpolations.append(InterpolationRecord::create(interpolation, easing, start, end, applyFrom, applyTo));
} }
void trace(Visitor*);
private: private:
InterpolationEffect() InterpolationEffect()
{ {
...@@ -56,7 +58,7 @@ private: ...@@ -56,7 +58,7 @@ private:
} }
}; };
WillBePersistentHeapVector<OwnPtrWillBeMember<InterpolationRecord> > m_interpolations; WillBeHeapVector<OwnPtrWillBeMember<InterpolationRecord> > m_interpolations;
}; };
} }
......
...@@ -30,7 +30,7 @@ protected: ...@@ -30,7 +30,7 @@ protected:
TEST_F(AnimationInterpolationEffectTest, SingleInterpolation) TEST_F(AnimationInterpolationEffectTest, SingleInterpolation)
{ {
RefPtr<InterpolationEffect> interpolationEffect = InterpolationEffect::create(); RefPtrWillBeRawPtr<InterpolationEffect> interpolationEffect = InterpolationEffect::create();
interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(0), InterpolableNumber::create(10)), interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(0), InterpolableNumber::create(10)),
RefPtr<TimingFunction>(), 0, 1, -1, 2); RefPtr<TimingFunction>(), 0, 1, -1, 2);
...@@ -55,7 +55,7 @@ TEST_F(AnimationInterpolationEffectTest, SingleInterpolation) ...@@ -55,7 +55,7 @@ TEST_F(AnimationInterpolationEffectTest, SingleInterpolation)
TEST_F(AnimationInterpolationEffectTest, MultipleInterpolations) TEST_F(AnimationInterpolationEffectTest, MultipleInterpolations)
{ {
RefPtr<InterpolationEffect> interpolationEffect = InterpolationEffect::create(); RefPtrWillBeRawPtr<InterpolationEffect> interpolationEffect = InterpolationEffect::create();
interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(10), InterpolableNumber::create(15)), interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(10), InterpolableNumber::create(15)),
RefPtr<TimingFunction>(), 1, 2, 1, 3); RefPtr<TimingFunction>(), 1, 2, 1, 3);
interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(0), InterpolableNumber::create(1)), interpolationEffect->addInterpolation(Interpolation::create(InterpolableNumber::create(0), InterpolableNumber::create(1)),
......
...@@ -267,6 +267,7 @@ bool KeyframeEffectModel::isReplaceOnly() ...@@ -267,6 +267,7 @@ bool KeyframeEffectModel::isReplaceOnly()
void KeyframeEffectModel::trace(Visitor* visitor) void KeyframeEffectModel::trace(Visitor* visitor)
{ {
visitor->trace(m_keyframes); visitor->trace(m_keyframes);
visitor->trace(m_interpolationEffect);
#if ENABLE_OILPAN #if ENABLE_OILPAN
visitor->trace(m_keyframeGroups); visitor->trace(m_keyframeGroups);
#endif #endif
......
...@@ -173,7 +173,7 @@ private: ...@@ -173,7 +173,7 @@ private:
typedef WillBeHeapHashMap<CSSPropertyID, OwnPtrWillBeMember<PropertySpecificKeyframeGroup> > KeyframeGroupMap; typedef WillBeHeapHashMap<CSSPropertyID, OwnPtrWillBeMember<PropertySpecificKeyframeGroup> > KeyframeGroupMap;
mutable OwnPtrWillBeMember<KeyframeGroupMap> m_keyframeGroups; mutable OwnPtrWillBeMember<KeyframeGroupMap> m_keyframeGroups;
mutable RefPtr<InterpolationEffect> m_interpolationEffect; mutable RefPtrWillBeMember<InterpolationEffect> m_interpolationEffect;
friend class KeyframeEffectModelTest; friend class KeyframeEffectModelTest;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment