[SPv175] Reduce over-invalidation of repaint during style update on paint property change.
In SPv1 mode, LayoutObject::AdjustStyleDifference will cause subtree paint invalidation (including PaintLayer repaint) on change of paint properties or z-index, but only if there is no direct compositing reason for the object. The reason for the LayoutObject paint invalidations was to cause raster invalidation as a side-effect. Painted display list output of individual LayoutObjects does not change as a result of these updates. In SPv175 mode, we don't need to invalidate paint of individual LayoutObjects just becaue of these changes, since raster invalidation happens via a new PaintChunk mechanism. However, we still need to cause PaintLayer repaint if any paint property tree nodes are added or removed, or z-index changes, to cause re-drawing of PaintChunks with the correct paint properties and order. There is already invalidation of PaintLayer repaint for paint property node change, in PaintPropertyTreeBuilder::UpdateForSelf and ::UpdateForChildren (it was added recently, after the code being removed in this CL was committed). Therefore we only need to invalidate repaint for z-index change. Further, this is only needed if the LayoutObject already had a PaintLayer, because z-index has no effect on objects without a PaintLayer, and there is already invalidation happening on PaintLayer addition or removal. Tested by: LayoutTests/paint/invalidation/compositing/chunk-reorder.html svg/transforms/change-transform-to-none-shape.html Bug:814711 Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2 Change-Id: I208b03b9e6b1a6635dab9585b8884ed0e2f8688d Reviewed-on: https://chromium-review.googlesource.com/954352 Commit-Queue: Chris Harrelson <chrishtr@chromium.org> Reviewed-by:Xianzhu Wang <wangxianzhu@chromium.org> Cr-Commit-Position: refs/heads/master@{#541981}
Showing
Please register or sign in to comment