Bug 1334036 - Part 13: Enable off-main thread animations. draft
authorBoris Chiou <boris.chiou@gmail.com>
Mon, 08 May 2017 11:22:13 +0800
changeset 579545 9611a98a8f87c011ec71ea46c94738977abcc53d
parent 579544 740f52175a510efc52cc25b2a58419a36576e0ba
child 629030 81a303202d872028605040a1711a9afe7b03ab26
push id59278
push userbmo:boris.chiou@gmail.com
push dateWed, 17 May 2017 11:42:32 +0000
bugs1334036
milestone55.0a1
Bug 1334036 - Part 13: 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
@@ -35,25 +35,17 @@ to mochitest command.
   * test_media_queries_dynamic_xbl.html [2]
   * test_webkit_device_pixel_ratio.html: -webkit-device-pixel-ratio [3]
   * browser_bug453896.js [8]
 * Animation support:
   * test_animations.html [1]
   * test_animations_dynamic_changes.html [1]
   * test_bug716226.html [1]
   * 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 [86]
   * SMIL Animation
     * test_restyles_in_smil_animation.html [2]
 * CSSOM support:
   * \@import bug 1352968
     * test_bug221428.html [1]
     * test_css_eof_handling.html [1]
   * \@keyframes bug 1345697
     * test_keyframes_rules.html [1]