author | Brian Birtles <birtles@gmail.com> |
Tue, 19 Jan 2016 08:05:08 +0900 | |
changeset 280418 | dd8bbf8f4e4abfc5ebc36da3b06594c0a9de1aa9 |
parent 280417 | 9f6f26cefebee13339fffd1668d1e318666035da |
child 280419 | 76b4de2ccd6ca11a8121d17558aee62caf943c9a |
push id | 70441 |
push user | bbirtles@mozilla.com |
push date | Mon, 18 Jan 2016 23:05:44 +0000 |
treeherder | mozilla-inbound@dd8bbf8f4e4a [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | heycam |
bugs | 1240228 |
milestone | 46.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
dom/animation/Animation.cpp | file | annotate | diff | comparison | revisions | |
dom/animation/EffectCompositor.cpp | file | annotate | diff | comparison | revisions |
--- a/dom/animation/Animation.cpp +++ b/dom/animation/Animation.cpp @@ -791,47 +791,38 @@ Animation::ComposeStyle(RefPtr<AnimValue // that case the compositor might have been ahead of the main thread so we // should use the current wallclock time to ensure the animation doesn't // temporarily jump backwards. // // To address each of these cases we temporarily tweak the hold time // immediately before updating the style rule and then restore it immediately // afterwards. This is purely to prevent visual flicker. Other behavior // such as dispatching events continues to rely on the regular timeline time. - bool updatedHoldTime = false; AnimationPlayState playState = PlayState(); { AutoRestore<Nullable<TimeDuration>> restoreHoldTime(mHoldTime); if (playState == AnimationPlayState::Pending && mHoldTime.IsNull() && !mStartTime.IsNull()) { Nullable<TimeDuration> timeToUse = mPendingReadyTime; if (timeToUse.IsNull() && mTimeline && mTimeline->TracksWallclockTime()) { timeToUse = mTimeline->ToTimelineTime(TimeStamp::Now()); } if (!timeToUse.IsNull()) { mHoldTime.SetValue((timeToUse.Value() - mStartTime.Value()) .MultDouble(mPlaybackRate)); - // Push the change down to the effect - UpdateEffect(); - updatedHoldTime = true; } } mEffect->ComposeStyle(aStyleRule, aSetProperties); } - // Now that the hold time has been restored, update the effect - if (updatedHoldTime) { - UpdateEffect(); - } - MOZ_ASSERT(playState == PlayState(), "Play state should not change during the course of compositing"); mFinishedAtLastComposeStyle = (playState == AnimationPlayState::Finished); } void Animation::NotifyEffectTimingUpdated() {
--- a/dom/animation/EffectCompositor.cpp +++ b/dom/animation/EffectCompositor.cpp @@ -560,16 +560,19 @@ EffectCompositor::ComposeAnimationRule(d // As a result, we iterate from last animation to first and, if a // property has already been set, we don't change it. nsCSSPropertySet properties; for (KeyframeEffectReadOnly* effect : Reversed(sortedEffectList)) { effect->GetAnimation()->ComposeStyle(animationRule, properties); } + MOZ_ASSERT(effects == EffectSet::GetEffectSet(aElement, aPseudoType), + "EffectSet should not change while composing style"); + effects->UpdateAnimationRuleRefreshTime(aCascadeLevel, aRefreshTime); } /* static */ void EffectCompositor::GetOverriddenProperties(nsStyleContext* aStyleContext, EffectSet& aEffectSet, nsCSSPropertySet& aPropertiesOverridden)