Bug 1361234 - Fix start time calculation for pending animations on layers; r=hiro
authorBrian Birtles <birtles@gmail.com>
Tue, 02 May 2017 16:41:13 +0900
changeset 406507 438c1291a77ab7b753fac99123ea3a7de6b57fb2
parent 406506 4317e4c2650579f892a2d64bceda9a19b09eda47
child 406508 fc0edea49a7028885bfcb2f0556d5324576a8a1b
push id1490
push usermtabara@mozilla.com
push dateMon, 31 Jul 2017 14:08:16 +0000
treeherdermozilla-release@70e32e6bf15e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewershiro
bugs1361234, 1223658
milestone55.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
Bug 1361234 - Fix start time calculation for pending animations on layers; r=hiro In bug 1223658 we separated out the delay from the start time but we failed to remove it from this calculation. As a result, when a pending animation begins it will have the delay applied twice (once here, and once when it is sampled on the compositor). This will happen until the layer is next updated. This bug was not exposed by any existing tests since we don't use this code path when the refresh driver is under test control. Furthermore, the one test that was supposed to cover this was refactored in such a way that it stopped testing this code path. That test is restored earlier in this patch series and enabled in this patch. MozReview-Commit-ID: B2KR7YaPsMK
dom/animation/test/mochitest.ini
gfx/layers/Layers.cpp
--- a/dom/animation/test/mochitest.ini
+++ b/dom/animation/test/mochitest.ini
@@ -96,17 +96,16 @@ support-files =
 [css-transitions/test_event-dispatch.html]
 [css-transitions/test_keyframeeffect-getkeyframes.html]
 [css-transitions/test_pseudoElement-get-animations.html]
 [css-transitions/test_setting-effect.html]
 [document-timeline/test_document-timeline.html]
 [document-timeline/test_request_animation_frame.html]
 [mozilla/test_cubic_bezier_limits.html]
 [mozilla/test_deferred_start.html]
-skip-if = true # Bug 1361234 (mostly fails)
 [mozilla/test_disable_animations_api_core.html]
 [mozilla/test_disabled_properties.html]
 [mozilla/test_discrete-animations.html]
 [mozilla/test_document-timeline-origin-time-range.html]
 [mozilla/test_hide_and_show.html]
 [mozilla/test_set-easing.html]
 [mozilla/test_spacing_property_order.html]
 [mozilla/test_transform_limits.html]
--- a/gfx/layers/Layers.cpp
+++ b/gfx/layers/Layers.cpp
@@ -288,17 +288,17 @@ Layer::StartPendingAnimations(const Time
       {
         bool updated = false;
         for (size_t animIdx = 0, animEnd = layer->mAnimations.Length();
              animIdx < animEnd; animIdx++) {
           Animation& anim = layer->mAnimations[animIdx];
 
           // If the animation is play-pending, resolve the start time.
           if (anim.startTime().IsNull() && !anim.isNotPlaying()) {
-            anim.startTime() = aReadyTime - anim.holdTime() + anim.delay();
+            anim.startTime() = aReadyTime - anim.holdTime();
             updated = true;
           }
         }
         if (updated) {
           layer->Mutated();
         }
       });
 }