Reviewers:
CL:
https://codereview.chromium.org/2847873002/https://codereview.chromium.org/2847873002/diff/20001/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/subpixel-offset-scaled-transform-expected.txtFile
third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/subpixel-offset-scaled-transform-expected.txt
(right):
https://codereview.chromium.org/2847873002/diff/20001/third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/subpixel-offset-scaled-transform-expected.txt#newcode16third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/subpixel-offset-scaled-transform-expected.txt:16:
"rect": [23, 8, 41, 40],
*This is disable-spinvalidation*.
The invalidation rect is incorrect or inconsistent with where we paint
the child. The child is painted at (8,8 40x40) and (8.3,8 40x40) before
and after repaintTest, respectively. The local offset (0.4, 0) is
rounded off when snapping to "pixels" in the child's space during
painting.
The invalidation rect is from the slow path
(MapToVisualRectInAncestorSpace()) in PaintInvalidationState.
PaintInvalidator MapToVisualRectInAncestorSpace
LocalVisualRect (0,0 1x1) (0,0 1x1)
+local offset (0.4,0 1x1) (0.4,0 1x1)
EnclosingIntRect (0,0 2x1)
Transformed (0,0 80x40) (~15,0 40x40)
EnclosingBoundingBox (~15,0 41x40)
+container offset (8.3,8 80x40) (~23,8 41x40)
The difference comes from the EnclosingIntRect step. Should we call
EnclosingIntRect() before applying transform in
MapToVisualRectInAncestorSpace? It was changed to EnclosingBoundingRect
after transform in
https://codereview.chromium.org/2727093002.
Description:
Don't pass subpixel offsets through non-translation transforms
Non-translation transforms will change direction and/or scale, etc.
of offsets thus making subpixel accumulation through the transform
meaningless.
This CL addresses the issue in PaintLayerPainter and
PaintPropertyTreeBuilder. We still need to address the issue in
CompositedLayerMapping (
crbug.com/716163).
BUG=710665
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Affected files (+433, -11 lines):
A third_party/WebKit/LayoutTests/paint/invalidation/subpixel-offset-scaled-transform.html
A third_party/WebKit/LayoutTests/paint/invalidation/subpixel-offset-scaled-transform-expected.png
A third_party/WebKit/LayoutTests/paint/invalidation/subpixel-offset-scaled-transform-expected.txt
A third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/subpixel-offset-scaled-transform-expected.png
A third_party/WebKit/LayoutTests/virtual/disable-spinvalidation/paint/invalidation/subpixel-offset-scaled-transform-expected.txt
M third_party/WebKit/Source/core/paint/PaintLayerPainter.cpp
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilder.cpp
M third_party/WebKit/Source/core/paint/PaintPropertyTreeBuilderTest.cpp