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

Unified Diff: Source/core/animation/InertAnimation.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 | « Source/core/animation/InertAnimation.h ('k') | Source/core/animation/InterpolationEffect.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/animation/InertAnimation.cpp
diff --git a/Source/core/animation/InertAnimation.cpp b/Source/core/animation/InertAnimation.cpp
index 483dd148a278ba31f2dfaf8865e869837212e34c..d22dfd53ef7dcbf5a260d8f41d73c6ab4573bd94 100644
--- a/Source/core/animation/InertAnimation.cpp
+++ b/Source/core/animation/InertAnimation.cpp
@@ -46,16 +46,18 @@ InertAnimation::InertAnimation(PassRefPtrWillBeRawPtr<AnimationEffect> effect, c
{
}
-PassOwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation> > > InertAnimation::sample(double inheritedTime)
+void InertAnimation::sample(double inheritedTime, OwnPtrWillBeRawPtr<WillBeHeapVector<RefPtrWillBeMember<Interpolation>>>& result)
{
updateInheritedTime(inheritedTime, TimingUpdateOnDemand);
- if (!isInEffect())
- return nullptr;
+ if (!isInEffect()) {
+ result.clear();
+ return;
+ }
double iteration = currentIteration();
ASSERT(iteration >= 0);
// FIXME: Handle iteration values which overflow int.
- return m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration());
+ return m_effect->sample(static_cast<int>(iteration), timeFraction(), iterationDuration(), result);
}
double InertAnimation::calculateTimeToEffectChange(bool, double, double) const
« no previous file with comments | « Source/core/animation/InertAnimation.h ('k') | Source/core/animation/InterpolationEffect.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698