Bug 1217748 - Don't consider opacity as animated if it's changed between discrete values. r?mattwoodrow draft
authorMarkus Stange <mstange@themasta.com>
Thu, 10 Aug 2017 15:00:50 -0400
changeset 644284 9847d8cfbe442ebca58a224dcfaaf6280874b8f3
parent 644269 7ec89cc89c394b4a42046c9a731d18700747e6b4
child 644285 16947e01d460003d5845e8f14213377a01b84423
child 644467 696fb92cab91cd7908edd496f94a64e5c346e686
child 645464 2295210dcb650424a8ea9a29fb3a3420eb69fb4e
push id73382
push userbmo:mstange@themasta.com
push dateThu, 10 Aug 2017 19:27:58 +0000
reviewersmattwoodrow
bugs1217748
milestone57.0a1
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
@@ -1062,17 +1062,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()) {