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

Unified Diff: Source/core/animation/KeyframeEffect.cpp

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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/animation/KeyframeEffect.h ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/KeyframeEffect.cpp
diff --git a/Source/core/animation/KeyframeEffect.cpp b/Source/core/animation/KeyframeEffect.cpp
index 4f95cedb5b6df95872982ddc10c558587b72c053..e8309decddddc3562e5120717516ef368af08b8b 100644
--- a/Source/core/animation/KeyframeEffect.cpp
+++ b/Source/core/animation/KeyframeEffect.cpp
@@ -49,26 +49,26 @@
namespace blink {
-PassRefPtrWillBeRawPtr<KeyframeEffect> KeyframeEffect::create(Element* target, PassRefPtrWillBeRawPtr<EffectModel> model, const Timing& timing, Priority priority, PassOwnPtrWillBeRawPtr<EventDelegate> eventDelegate)
+KeyframeEffect* KeyframeEffect::create(Element* target, EffectModel* model, const Timing& timing, Priority priority, EventDelegate* eventDelegate)
{
- return adoptRefWillBeNoop(new KeyframeEffect(target, model, timing, priority, eventDelegate));
+ return new KeyframeEffect(target, model, timing, priority, eventDelegate);
}
-PassRefPtrWillBeRawPtr<KeyframeEffect> KeyframeEffect::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, double duration, ExceptionState& exceptionState)
+KeyframeEffect* KeyframeEffect::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, double duration, ExceptionState& exceptionState)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
if (element)
UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
return create(element, EffectInput::convert(element, keyframeDictionaryVector, exceptionState), TimingInput::convert(duration));
}
-PassRefPtrWillBeRawPtr<KeyframeEffect> KeyframeEffect::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, const KeyframeEffectOptions& timingInput, ExceptionState& exceptionState)
+KeyframeEffect* KeyframeEffect::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, const KeyframeEffectOptions& timingInput, ExceptionState& exceptionState)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
if (element)
UseCounter::count(element->document(), UseCounter::AnimationConstructorKeyframeListEffectObjectTiming);
return create(element, EffectInput::convert(element, keyframeDictionaryVector, exceptionState), TimingInput::convert(timingInput));
}
-PassRefPtrWillBeRawPtr<KeyframeEffect> KeyframeEffect::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState)
+KeyframeEffect* KeyframeEffect::create(Element* element, const Vector<Dictionary>& keyframeDictionaryVector, ExceptionState& exceptionState)
{
ASSERT(RuntimeEnabledFeatures::webAnimationsAPIEnabled());
if (element)
@@ -76,25 +76,17 @@ PassRefPtrWillBeRawPtr<KeyframeEffect> KeyframeEffect::create(Element* element,
return create(element, EffectInput::convert(element, keyframeDictionaryVector, exceptionState), Timing());
}
-KeyframeEffect::KeyframeEffect(Element* target, PassRefPtrWillBeRawPtr<EffectModel> model, const Timing& timing, Priority priority, PassOwnPtrWillBeRawPtr<EventDelegate> eventDelegate)
+KeyframeEffect::KeyframeEffect(Element* target, EffectModel* model, const Timing& timing, Priority priority, EventDelegate* eventDelegate)
: AnimationEffect(timing, eventDelegate)
, m_target(target)
, m_model(model)
, m_sampledEffect(nullptr)
, m_priority(priority)
{
-#if !ENABLE(OILPAN)
- if (m_target)
- m_target->ensureElementAnimations().addEffect(this);
-#endif
}
KeyframeEffect::~KeyframeEffect()
{
-#if !ENABLE(OILPAN)
- if (m_target)
- m_target->elementAnimations()->notifyEffectDestroyed(this);
-#endif
}
void KeyframeEffect::attach(Animation* animation)
@@ -180,15 +172,15 @@ void KeyframeEffect::applyEffects()
double iteration = currentIteration();
ASSERT(iteration >= 0);
- OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>> interpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullptr;
+ HeapVector<Member<Interpolation>>* interpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullptr;
// FIXME: Handle iteration values which overflow int.
m_model->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), interpolations);
if (m_sampledEffect) {
- m_sampledEffect->setInterpolations(interpolations.release());
+ m_sampledEffect->setInterpolations(interpolations);
} else if (interpolations && !interpolations->isEmpty()) {
- OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(this, interpolations.release());
- m_sampledEffect = sampledEffect.get();
- ensureAnimationStack(m_target).add(sampledEffect.release());
+ SampledEffect* sampledEffect = SampledEffect::create(this, interpolations);
+ m_sampledEffect = sampledEffect;
+ ensureAnimationStack(m_target).add(sampledEffect);
} else {
return;
}
« no previous file with comments | « Source/core/animation/KeyframeEffect.h ('k') | Source/core/animation/KeyframeEffectModel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698