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

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

Issue 732153003: Update a result vector when sampling animation effects. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 1 month 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 | « no previous file | Source/core/animation/AnimationEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/Animation.cpp
diff --git a/Source/core/animation/Animation.cpp b/Source/core/animation/Animation.cpp
index cbae427693f4b04d6439c976a5b224c0fefebf65..7a99a891a071e9f1de88016d141889dce6f58b0a 100644
--- a/Source/core/animation/Animation.cpp
+++ b/Source/core/animation/Animation.cpp
@@ -149,11 +149,12 @@ void Animation::applyEffects()
double iteration = currentIteration();
ASSERT(iteration >= 0);
+ OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations = m_sampledEffect ? m_sampledEffect->mutableInterpolations() : nullptr;
// FIXME: Handle iteration values which overflow int.
- OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > interpolations = m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration());
+ m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), interpolations);
if (m_sampledEffect) {
m_sampledEffect->setInterpolations(interpolations.release());
- } else if (!interpolations->isEmpty()) {
+ } else if (interpolations && !interpolations->isEmpty()) {
OwnPtrWillBeRawPtr<SampledEffect> sampledEffect = SampledEffect::create(this, interpolations.release());
m_sampledEffect = sampledEffect.get();
ensureAnimationStack(m_target).add(sampledEffect.release());
« no previous file with comments | « no previous file | Source/core/animation/AnimationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698