[SPInvalidation] Handle pixel-snapping of paint invalidation rects
In SlimmingPaintInvalidation mode we can snap a paint invalidation
rect to whole pixels more accurately by applying paint offset to
the local paint invalidation rect and expanding the rect to whole
pixels before mapping it to backing, as discussed in
https://bugs.chromium.org/p/chromium/issues/detail?id=648769#c6.
This causes a new issue that the paint invalidation rect may cover
extra pixels causing incremental invalidation not applicable. To avoid
the issue, now force full paint invalidation in the case.
Also confirmed that our current handling of SVG pixel snapping is
already correct. In PaintPropertyTreeBuilder, we bake the current
paint offset into transformToPixelSnappedBorderBox() of SVGRoot which
correctly handles pixel snapping. For SVG foreign objects, pixel
snapping of geometries is done during layout.
BUG=
648769
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Committed:
https://crrev.com/8f9c94471ef61f9bc6ddd7ddb3b485c3b76b30cd
Cr-Commit-Position: refs/heads/master@{#427827}