diff options
author | wolfbeast <mcwerewolf@gmail.com> | 2018-05-15 14:06:42 +0200 |
---|---|---|
committer | wolfbeast <mcwerewolf@gmail.com> | 2018-05-15 14:06:42 +0200 |
commit | a44c11577adc650d0bb97cba801752d04ec55a53 (patch) | |
tree | 4547a45ae09623627d3ffbebac932842f169fc01 | |
parent | 20324ef5ae58e1e0d420ef596735eea47a56e6b7 (diff) | |
download | uxp-a44c11577adc650d0bb97cba801752d04ec55a53.tar.gz |
Use a temporary in Animation::Tick()
-rw-r--r-- | dom/animation/Animation.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/dom/animation/Animation.cpp b/dom/animation/Animation.cpp index bd318f79e3..f4d29376c4 100644 --- a/dom/animation/Animation.cpp +++ b/dom/animation/Animation.cpp @@ -589,8 +589,10 @@ Animation::Tick() // during the *previous* tick of the refresh driver, it can still be // ahead of the *current* timeline time when we are using the // vsync timer so we need to clamp it to the timeline time. - mPendingReadyTime.SetValue(std::min(mTimeline->GetCurrentTime().Value(), - mPendingReadyTime.Value())); + TimeDuration currentTime = mTimeline->GetCurrentTime().Value(); + if (currentTime < mPendingReadyTime.Value()) { + mPendingReadyTime.SetValue(currentTime); + } FinishPendingAt(mPendingReadyTime.Value()); mPendingReadyTime.SetNull(); } |