diff --git a/dom/animation/Animation.cpp b/dom/animation/Animation.cpp index 18aa340fd5b1..e7c52db5a7a6 100644 --- a/dom/animation/Animation.cpp +++ b/dom/animation/Animation.cpp @@ -183,11 +183,6 @@ void Animation::SetEffectNoUpdate(AnimationEffect* aEffect) { // Break links with the old effect and then drop it. RefPtr oldEffect = mEffect; mEffect = nullptr; - if (IsPartialPrerendered()) { - if (KeyframeEffect* oldKeyframeEffect = oldEffect->AsKeyframeEffect()) { - oldKeyframeEffect->ResetPartialPrerendered(); - } - } oldEffect->SetAnimation(nullptr); // The following will not do any notification because mEffect is null. diff --git a/dom/animation/Animation.h b/dom/animation/Animation.h index b5e50725e70b..503daa103f3e 100644 --- a/dom/animation/Animation.h +++ b/dom/animation/Animation.h @@ -421,30 +421,6 @@ class Animation : public DOMEventTargetHelper, int32_t& CachedChildIndexRef() { return mCachedChildIndex; } - void SetPartialPrerendered(uint64_t aIdOnCompositor) { - mIdOnCompositor = aIdOnCompositor; - mIsPartialPrerendered = true; - } - bool IsPartialPrerendered() const { return mIsPartialPrerendered; } - uint64_t IdOnCompositor() const { return mIdOnCompositor; } - /** - * Needs to be called when the pre-rendered animation is going to no longer - * run on the compositor. - */ - void ResetPartialPrerendered() { - MOZ_ASSERT(mIsPartialPrerendered); - mIsPartialPrerendered = false; - mIdOnCompositor = 0; - } - /** - * Called via NotifyJankedAnimations IPC call from the compositor to update - * pre-rendered area on the main-thread. - */ - void UpdatePartialPrerendered() { - ResetPartialPrerendered(); - PostUpdate(); - } - protected: void SilentlySetCurrentTime(const TimeDuration& aNewCurrentTime); void CancelNoUpdate(); @@ -642,11 +618,6 @@ class Animation : public DOMEventTargetHelper, RefPtr mFinishNotificationTask; nsString mId; - - private: - // The id for this animaiton on the compositor. - uint64_t mIdOnCompositor = 0; - bool mIsPartialPrerendered = false; }; } // namespace dom diff --git a/dom/animation/KeyframeEffect.cpp b/dom/animation/KeyframeEffect.cpp index 243fcec60884..3a9deb3133b2 100644 --- a/dom/animation/KeyframeEffect.cpp +++ b/dom/animation/KeyframeEffect.cpp @@ -684,8 +684,6 @@ void KeyframeEffect::SetIsRunningOnCompositor(nsCSSPropertyID aProperty, // on the compositor we don't need a message. if (aIsRunning) { property.mPerformanceWarning.reset(); - } else if (mAnimation && mAnimation->IsPartialPrerendered()) { - ResetPartialPrerendered(); } return; } @@ -709,39 +707,12 @@ void KeyframeEffect::SetIsRunningOnCompositor( } } } - - if (!aIsRunning && mAnimation && mAnimation->IsPartialPrerendered()) { - ResetPartialPrerendered(); - } } void KeyframeEffect::ResetIsRunningOnCompositor() { for (AnimationProperty& property : mProperties) { property.mIsRunningOnCompositor = false; } - - if (mAnimation && mAnimation->IsPartialPrerendered()) { - ResetPartialPrerendered(); - } -} - -void KeyframeEffect::ResetPartialPrerendered() { - MOZ_ASSERT(mAnimation && mAnimation->IsPartialPrerendered()); - - nsIFrame* frame = GetPrimaryFrame(); - if (!frame) { - return; - } - - nsIWidget* widget = frame->GetNearestWidget(); - if (!widget) { - return; - } - - if (layers::LayerManager* layerManager = widget->GetLayerManager()) { - layerManager->RemovePartialPrerenderedAnimation( - mAnimation->IdOnCompositor(), mAnimation); - } } static bool IsSupportedPseudoForWebAnimation(PseudoStyleType aType) { diff --git a/dom/animation/KeyframeEffect.h b/dom/animation/KeyframeEffect.h index 2b9668781372..0d4620e9134e 100644 --- a/dom/animation/KeyframeEffect.h +++ b/dom/animation/KeyframeEffect.h @@ -274,8 +274,6 @@ class KeyframeEffect : public AnimationEffect { bool aIsRunning); void ResetIsRunningOnCompositor(); - void ResetPartialPrerendered(); - // Returns true if this effect, applied to |aFrame|, contains properties // that mean we shouldn't run transform compositor animations on this element. // diff --git a/dom/animation/test/mozilla/file_restyles.html b/dom/animation/test/mozilla/file_restyles.html index ad3fbdfa713e..90544e11cca1 100644 --- a/dom/animation/test/mozilla/file_restyles.html +++ b/dom/animation/test/mozilla/file_restyles.html @@ -1,6 +1,5 @@ - Tests restyles caused by animations - diff --git a/layout/reftests/transform/partial-prerender-translate-2-ref.html b/layout/reftests/transform/partial-prerender-translate-2-ref.html deleted file mode 100644 index 98ee6a1f140b..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-2-ref.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -
- - - - - -
- diff --git a/layout/reftests/transform/partial-prerender-translate-2.html b/layout/reftests/transform/partial-prerender-translate-2.html deleted file mode 100644 index 550a74084adb..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-2.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -
- - - - - - -
- - diff --git a/layout/reftests/transform/partial-prerender-translate-3-ref.html b/layout/reftests/transform/partial-prerender-translate-3-ref.html deleted file mode 100644 index d4941007bdf7..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-3-ref.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - -
- diff --git a/layout/reftests/transform/partial-prerender-translate-3.html b/layout/reftests/transform/partial-prerender-translate-3.html deleted file mode 100644 index 6e4ad202b11c..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-3.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - - -
- - - - -
- - diff --git a/layout/reftests/transform/partial-prerender-translate-4.html b/layout/reftests/transform/partial-prerender-translate-4.html deleted file mode 100644 index 11ff491b8701..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-4.html +++ /dev/null @@ -1,56 +0,0 @@ - - - - - -
-
- - - - -
-
- - diff --git a/layout/reftests/transform/partial-prerender-translate-5-ref.html b/layout/reftests/transform/partial-prerender-translate-5-ref.html deleted file mode 100644 index c2047502af41..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-5-ref.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - -
-
-
- - - - - - -
-
- diff --git a/layout/reftests/transform/partial-prerender-translate-5.html b/layout/reftests/transform/partial-prerender-translate-5.html deleted file mode 100644 index 6225b7de251c..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-5.html +++ /dev/null @@ -1,58 +0,0 @@ - - - - - -
-
-
- - - - - - -
-
- - diff --git a/layout/reftests/transform/partial-prerender-translate-6-ref.html b/layout/reftests/transform/partial-prerender-translate-6-ref.html deleted file mode 100644 index dece645afb4f..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-6-ref.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - -
- - - - - -
- diff --git a/layout/reftests/transform/partial-prerender-translate-6.html b/layout/reftests/transform/partial-prerender-translate-6.html deleted file mode 100644 index 1ec13f44d77d..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-6.html +++ /dev/null @@ -1,54 +0,0 @@ - - - - -
- - - - - - -
- - diff --git a/layout/reftests/transform/partial-prerender-translate-7.html b/layout/reftests/transform/partial-prerender-translate-7.html deleted file mode 100644 index 06c26c66fbf5..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-7.html +++ /dev/null @@ -1,53 +0,0 @@ - - - - - -
-
- - - - - -
-
- - diff --git a/layout/reftests/transform/partial-prerender-translate-8-ref.html b/layout/reftests/transform/partial-prerender-translate-8-ref.html deleted file mode 100644 index ddf5bda1722e..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-8-ref.html +++ /dev/null @@ -1,44 +0,0 @@ - - - - - - - diff --git a/layout/reftests/transform/partial-prerender-translate-8.html b/layout/reftests/transform/partial-prerender-translate-8.html deleted file mode 100644 index 0fc633a532d5..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-8.html +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - diff --git a/layout/reftests/transform/partial-prerender-translate-9.html b/layout/reftests/transform/partial-prerender-translate-9.html deleted file mode 100644 index 2c6af406cb32..000000000000 --- a/layout/reftests/transform/partial-prerender-translate-9.html +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - diff --git a/layout/reftests/transform/reftest.list b/layout/reftests/transform/reftest.list index 68f8e89e6dad..fa58a8020b7e 100644 --- a/layout/reftests/transform/reftest.list +++ b/layout/reftests/transform/reftest.list @@ -156,20 +156,7 @@ test-pref(layout.css.zoom-transform-hack.enabled,false) != zoom-hack-1.html zoom test-pref(layout.css.zoom-transform-hack.enabled,true) == zoom-hack-2.html zoom-hack-ref.html == transform-anon-block-1.html transform-anon-block-1-ref.html -test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) == partial-prerender-expansion-translate.html partial-prerender-expansion-ref.html -test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) == partial-prerender-translate-1.html about:blank -skip-if(webrender) test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-2.html partial-prerender-translate-2-ref.html # bug 1638152 for WebRender -fails test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-3.html partial-prerender-translate-3-ref.html # bug 1642575 -# This reftest doesn't fail on WebRender, this reftest fails only if there is a jank mechanism and the mechanism doesn't properly handle ancestor's transform values -test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-4.html partial-prerender-expansion-ref.html -# This reftest doesn't fail on WebRender, this reftest fails only if there is a jank mechanism and the mechanism does inproperly handle position:fixed scroll target -test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-5.html partial-prerender-translate-5-ref.html -fails-if(webrender) test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-6.html partial-prerender-translate-6-ref.html # bug 1638152 for WebRender -fails-if(webrender) test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-7.html partial-prerender-translate-2-ref.html # bug 1638152 for WebRender -# This reftest doesn't fail on WebRender, this reftest fails only if there is a jank mechanism and the mechanism doesn't properly clip transform in iframes. -test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-8.html partial-prerender-translate-8-ref.html -# This reftest doesn't fail on WebRender, this reftest fails only if there is a jank mechanism and the mechanism does inproperly handle position:fixed scroll target -test-pref(layout.animation.prerender.partial.jank,true) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-translate-9.html partial-prerender-translate-5-ref.html +test-pref(layout.animation.prerender.partial,true) == partial-prerender-expansion-translate.html partial-prerender-expansion-ref.html # This reftest heavily depends on layout.animation.prerender.viewport-ratio-limit # and reftest viewport size (800, 1000). skip-if(/^Windows\x20NT\x206\.1/.test(http.oscpu)||Android) test-pref(layout.animation.prerender.partial,true) test-pref(layout.animation.prerender.viewport-ratio-limit,"1.125") == partial-prerender-expansion-rotate.html partial-prerender-expansion-ref.html diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml index ccaba430d12b..ed4c0cf4a99b 100644 --- a/modules/libpref/init/StaticPrefList.yaml +++ b/modules/libpref/init/StaticPrefList.yaml @@ -5601,14 +5601,6 @@ value: 4096 mirror: always -# Test-only pref, if this is true, partial pre-rendered transform animations -# get stuck when it reaches to the pre-rendered boundaries and the pre-render -# region is never updated. -- name: layout.animation.prerender.partial.jank - type: RelaxedAtomicBool - value: false - mirror: always - # Whether Constructable Stylesheets are enabled in script. - name: layout.css.constructable-stylesheets.enabled type: bool