Bug 1334036 - Part 12: Enable off-main thread animations. draft
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 08 May 2017 11:22:13 +0800
changeset 581946 2625af2fad74f9410a52a143c7b1c4a2997018d8
parent 581944 84c8765bc20eb5b325e53024ef9c1c7f1ae982a1
child 629621 75e5927ff0f98bfb2936f3ab670905f4ddd21615
push id59917
push userbmo:boris.chiou@gmail.com
push dateSat, 20 May 2017 07:07:55 +0000
bugs1334036
milestone55.0a1
Bug 1334036 - Part 12: Enable off-main thread animations. Remove the unconditional return from FindAnimationsForCompositor(), so we can check if there is any property running on compositor. Also, enable a reftest and fix the mochitest expectation: 1. The expectation numbers of test_animations_omta.html in e10s and non-e10s are different, so skip non-e10s. 2. We pass all tests in test_animations_omta_start.html with e10s; however, got 3 test failures with non-e10s, so skip this file with non-e10s. MozReview-Commit-ID: IuOyAsUYguU
dom/animation/EffectCompositor.cpp
layout/reftests/invalidation/reftest.list
layout/style/test/mochitest.ini
layout/style/test/stylo-failures.md
--- a/dom/animation/EffectCompositor.cpp
+++ b/dom/animation/EffectCompositor.cpp
@@ -128,23 +128,16 @@ FindAnimationsForCompositor(const nsIFra
   MOZ_ASSERT(!aMatches || aMatches->IsEmpty(),
              "Matches array, if provided, should be empty");
 
   EffectSet* effects = EffectSet::GetEffectSet(aFrame);
   if (!effects || effects->IsEmpty()) {
     return false;
   }
 
-  // FIXME: Bug 1334036: stylo: Implement off-main-thread animations.
-  if (aFrame->StyleContext()->StyleSource().IsServoComputedValues()) {
-    NS_WARNING("stylo: return false in FindAnimationsForCompositor because "
-               "haven't supported compositor-driven animations yet");
-    return false;
-  }
-
   // First check for newly-started transform animations that should be
   // synchronized with geometric animations. We need to do this before any
   // other early returns (the one above is ok) since we can only check this
   // state when the animation is newly-started.
   if (aProperty == eCSSProperty_transform) {
     PendingAnimationTracker* tracker =
       aFrame->PresContext()->Document()->GetPendingAnimationTracker();
     if (tracker) {
@@ -283,19 +276,16 @@ EffectCompositor::RequestRestyle(dom::El
     bool hasPendingRestyle = elementsToRestyle.Get(key);
     if (!hasPendingRestyle) {
       PostRestyleForAnimation(aElement, aPseudoType, aCascadeLevel);
     }
     elementsToRestyle.Put(key, true);
   }
 
   if (aRestyleType == RestyleType::Layer) {
-    // FIXME: Bug 1334036: we call RequestRestyle for both stylo and gecko,
-    // so we should make sure we use mAnimationGecneration properly on OMTA.
-    // Prompt layers to re-sync their animations.
     mPresContext->RestyleManager()->IncrementAnimationGeneration();
     EffectSet* effectSet =
       EffectSet::GetEffectSet(aElement, aPseudoType);
     if (effectSet) {
       effectSet->UpdateAnimationGeneration(mPresContext);
     }
   }
 }
--- a/layout/reftests/invalidation/reftest.list
+++ b/layout/reftests/invalidation/reftest.list
@@ -43,17 +43,17 @@ pref(layout.animated-image-layers.enable
 fails-if(webrender) != scroll-inactive-layers.html about:blank
 fails-if(webrender) != scroll-inactive-layers-2.html about:blank
 fails-if(webrender) != inactive-layertree-visible-region-1.html about:blank
 fails-if(webrender) != inactive-layertree-visible-region-2.html about:blank
 fails-if(webrender) != transform-floating-point-invalidation.html about:blank
 fails-if(webrender) != transform-floating-point-invalidation.html?reverse about:blank
 fails-if(webrender) != nudge-to-integer-invalidation.html about:blank
 fails-if(webrender) != nudge-to-integer-invalidation.html?reverse about:blank
-fails-if(webrender) skip-if(stylo) != clipped-animated-transform-1.html about:blank # Bug 1334036 (stylo)
+fails-if(webrender) skip-if(stylo) != clipped-animated-transform-1.html about:blank # Bug 1352628 (stylo)
 fails-if(webrender) != paintedlayer-recycling-1.html about:blank
 fails-if(webrender) != paintedlayer-recycling-2.html about:blank
 pref(layers.single-tile.enabled,false) fails-if(webrender) != paintedlayer-recycling-3.html about:blank
 fails-if(webrender) != paintedlayer-recycling-4.html about:blank
 fails-if(webrender) != paintedlayer-recycling-5.html about:blank
 fails-if(webrender) != paintedlayer-recycling-6.html about:blank
 fails-if(webrender) != paintedlayer-recycling-7.html about:blank
 != masklayer-1.html about:blank
--- a/layout/style/test/mochitest.ini
+++ b/layout/style/test/mochitest.ini
@@ -55,17 +55,19 @@ skip-if = true # bug 1352336
 support-files = file_animations_effect_timing_enddelay.html
 [test_animations_effect_timing_iterations.html]
 support-files = file_animations_effect_timing_iterations.html
 [test_animations_event_order.html]
 [test_animations_event_handler_attribute.html]
 [test_animations_iterationstart.html]
 support-files = file_animations_iterationstart.html
 [test_animations_omta.html]
+skip-if = (stylo && !e10s) # mochitest expectations are different with non-e10s, bug 1361938, bug 1361663
 [test_animations_omta_start.html]
+skip-if = (stylo && !e10s) # mochitest expectations are different with non-e10s, bug 1362292
 [test_animations_pausing.html]
 support-files = file_animations_pausing.html
 [test_animations_playbackrate.html]
 support-files = file_animations_playbackrate.html
 [test_animations_reverse.html]
 support-files = file_animations_reverse.html
 [test_animations_styles_on_event.html]
 skip-if = stylo # timeout bug 1328505
--- a/layout/style/test/stylo-failures.md
+++ b/layout/style/test/stylo-failures.md
@@ -37,25 +37,17 @@ to mochitest command.
   * browser_bug453896.js [8]
 * Animation support:
   * test_animations.html [3]
   * test_animations_dynamic_changes.html [1]
   * test_bug716226.html [3]
   * inserting keyframes rule doesn't trigger restyle bug 1364799:
     * test_rule_insertion.html `@keyframes` [36]
   * OMTA
-    * test_animations_effect_timing_duration.html [1]
-    * test_animations_effect_timing_enddelay.html [1]
-    * test_animations_effect_timing_iterations.html [1]
-    * test_animations_iterationstart.html [1]
-    * test_animations_omta.html [1]
-    * test_animations_omta_start.html [1]
-    * test_animations_pausing.html [1]
-    * test_animations_playbackrate.html [1]
-    * test_animations_reverse.html [1]
+    * test_animations_omta.html: bug 1361938, bug 1361663 [88]
   * SMIL Animation
     * test_restyles_in_smil_animation.html [2]
 * CSSOM support:
   * \@import bug 1352968
     * test_bug221428.html [1]
     * test_css_eof_handling.html [1]
 * test_bug397427.html: @import issue bug 1331291 and CSSOM support of @import [1]
 * console support bug 1352669