Bug 1217748 - Don't consider opacity as animated if it's changed between discrete values. r=mattwoodrow
authorMarkus Stange <mstange@themasta.com>
Thu, 10 Aug 2017 15:00:50 -0400
changeset 418840 07344dd474326a185413c934db93331b1edda24a
parent 418839 692f80296f22244440bb3bc8d853f794154b35a9
child 418841 2375438b837c39405dd2c3fa143c12611be82e02
push id34014
push useraciure@mozilla.com
push dateFri, 18 May 2018 22:04:52 +0000
treeherdermozilla-central@b54f574a1dd2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmattwoodrow
bugs1217748
milestone62.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 1217748 - Don't consider opacity as animated if it's changed between discrete values. r=mattwoodrow CSS animations / transitions and element.animate animations of opacity will still be treated as animations. JS-implemented opacity animations will no longer be detected as animations. I hope that's fine. The current heuristic makes us detect opacity 'animations' in lots of cases where there isn't an actual animation, and the resulting layerization changes from those detected animations cause expensive repaints. MozReview-Commit-ID: KJlc6c8OWSP
layout/base/RestyleManager.cpp
--- a/layout/base/RestyleManager.cpp
+++ b/layout/base/RestyleManager.cpp
@@ -1039,17 +1039,16 @@ DoApplyRenderingChangeToTree(nsIFrame* a
         MOZ_ASSERT(false, "unexpected frame got nsChangeHint_UpdateTextPath");
       }
     }
     if (aChange & nsChangeHint_UpdateOpacityLayer) {
       // FIXME/bug 796697: we can get away with empty transactions for
       // opacity updates in many cases.
       needInvalidatingPaint = true;
 
-      ActiveLayerTracker::NotifyRestyle(aFrame, eCSSProperty_opacity);
       if (nsSVGIntegrationUtils::UsingEffectsForFrame(aFrame)) {
         // SVG effects paints the opacity without using
         // nsDisplayOpacity. We need to invalidate manually.
         aFrame->InvalidateFrameSubtree();
       }
     }
     if ((aChange & nsChangeHint_UpdateTransformLayer) &&
         aFrame->IsTransformed()) {