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
--- 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()) {