Commit 5fb9a314 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[SPv175+] Use correct paint properties when painting fragments

When painting multiple fragments, update chunk properties per fragment.

Bug: 771643
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I4cc30deb1b81d4a5a6076ac6df86549b6a15be50
Reviewed-on: https://chromium-review.googlesource.com/783839Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#519903}
parent aff60f65
...@@ -84,7 +84,6 @@ crbug.com/771643 virtual/spv175/compositing/composited-scaled-child-with-border- ...@@ -84,7 +84,6 @@ crbug.com/771643 virtual/spv175/compositing/composited-scaled-child-with-border-
crbug.com/771643 virtual/spv175/compositing/composited-translated-child-with-border-radius-parent-clip.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/composited-translated-child-with-border-radius-parent-clip.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/opacity-with-mask.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/opacity-with-mask.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/fixed-body-background-positioned.html [ Failure Pass ] crbug.com/771643 virtual/spv175/compositing/fixed-body-background-positioned.html [ Failure Pass ]
crbug.com/771643 virtual/spv175/compositing/geometry/composited-in-columns.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/geometry/repaint-foreground-layer.html [ Crash ] crbug.com/771643 virtual/spv175/compositing/geometry/repaint-foreground-layer.html [ Crash ]
crbug.com/771643 virtual/spv175/compositing/images/direct-image-dynamic-border-radius.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/images/direct-image-dynamic-border-radius.html [ Failure ]
crbug.com/771643 virtual/spv175/compositing/masks/direct-image-mask.html [ Failure ] crbug.com/771643 virtual/spv175/compositing/masks/direct-image-mask.html [ Failure ]
...@@ -127,16 +126,7 @@ crbug.com/771643 virtual/spv175/paint/invalidation/compositing/subpixel-offset-s ...@@ -127,16 +126,7 @@ crbug.com/771643 virtual/spv175/paint/invalidation/compositing/subpixel-offset-s
# Seems to pass with DCHECK. # Seems to pass with DCHECK.
crbug.com/771643 virtual/spv175/paint/invalidation/filters/filter-on-html-element-with-fixed-position-child.html [ Failure Pass ] crbug.com/771643 virtual/spv175/paint/invalidation/filters/filter-on-html-element-with-fixed-position-child.html [ Failure Pass ]
crbug.com/771643 virtual/spv175/paint/invalidation/forms/select-option-background-color.html [ Failure ] crbug.com/771643 virtual/spv175/paint/invalidation/forms/select-option-background-color.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/column-rule-change.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/column-rules-fixed-height.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-as-paint-container.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-nested.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-repaint.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-rule-actual-columns-change.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-with-block.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-with-inline.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-with-overflowing-block-rl.html [ Failure ] crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-with-overflowing-block-rl.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/multicol/multicol-with-text.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/overflow/composited-overflow-with-negative-offset-outline.html [ Failure ] crbug.com/771643 virtual/spv175/paint/invalidation/overflow/composited-overflow-with-negative-offset-outline.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/overflow/opacity-change-on-overflow-float.html [ Failure ] crbug.com/771643 virtual/spv175/paint/invalidation/overflow/opacity-change-on-overflow-float.html [ Failure ]
crbug.com/771643 virtual/spv175/paint/invalidation/overflow/paged-with-overflowing-block-rl.html [ Failure ] crbug.com/771643 virtual/spv175/paint/invalidation/overflow/paged-with-overflowing-block-rl.html [ Failure ]
......
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutMultiColumnSet (anonymous)",
"rect": [8, 52, 525, 315],
"reason": "style change"
},
{
"object": "InlineTextBox 'There should be a blue square below. There should also be five vertical red lines.'",
"rect": [8, 16, 509, 19],
"reason": "appeared"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [110, 52, 106, 315],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [110, 52, 106, 315],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [8, 0, 103, 367],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [8, 0, 103, 367],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [215, 52, 103, 315],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [215, 52, 103, 315],
"reason": "chunk uncacheable"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='target'",
"reason": "style change"
},
{
"object": "LayoutMultiColumnSet (anonymous)",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutBlockFlow DIV id='target'",
"position": [8, 8],
"bounds": [630, 180],
"backfaceVisibility": "hidden",
"paintInvalidations": [
{
"object": "InlineTextBox 'Lorem ipsum'",
"rect": [0, 0, 315, 180],
"reason": "chunk uncacheable"
},
{
"object": "InlineTextBox 'Lorem ipsum'",
"rect": [0, 0, 315, 180],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [315, 0, 310, 180],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [315, 0, 310, 180],
"reason": "chunk uncacheable"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'Lorem ipsum'",
"reason": "style change"
},
{
"object": "InlineTextBox 'dolor sit amet,'",
"reason": "style change"
},
{
"object": "InlineTextBox 'consectetur'",
"reason": "style change"
},
{
"object": "InlineTextBox 'adipiscing'",
"reason": "style change"
},
{
"object": "InlineTextBox 'elit. Fusce'",
"reason": "style change"
},
{
"object": "InlineTextBox 'varius, metus'",
"reason": "style change"
},
{
"object": "InlineTextBox 'eu fringilla'",
"reason": "style change"
},
{
"object": "InlineTextBox 'pulvinar, ipsum'",
"reason": "style change"
},
{
"object": "InlineTextBox 'sapien'",
"reason": "style change"
},
{
"object": "InlineTextBox 'ultricies arcu,'",
"reason": "style change"
},
{
"object": "InlineTextBox 'non condimentum'",
"reason": "style change"
},
{
"object": "InlineTextBox 'quam est eu'",
"reason": "style change"
},
{
"object": "InlineTextBox 'purus. Ut nisl'",
"reason": "style change"
},
{
"object": "InlineTextBox 'libero,'",
"reason": "style change"
},
{
"object": "InlineTextBox 'suscipit ut leo'",
"reason": "style change"
},
{
"object": "InlineTextBox 'eget, dapibus'",
"reason": "style change"
},
{
"object": "InlineTextBox 'ultrices dolor.'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'Lorem ipsum'",
"reason": "style change"
},
{
"object": "InlineTextBox 'dolor sit amet,'",
"reason": "style change"
},
{
"object": "InlineTextBox 'consectetur'",
"reason": "style change"
},
{
"object": "InlineTextBox 'adipiscing'",
"reason": "style change"
},
{
"object": "InlineTextBox 'elit. Fusce'",
"reason": "style change"
},
{
"object": "InlineTextBox 'varius, metus'",
"reason": "style change"
},
{
"object": "InlineTextBox 'eu fringilla'",
"reason": "style change"
},
{
"object": "InlineTextBox 'pulvinar, ipsum'",
"reason": "style change"
},
{
"object": "InlineTextBox 'sapien'",
"reason": "style change"
},
{
"object": "InlineTextBox 'ultricies arcu,'",
"reason": "style change"
},
{
"object": "InlineTextBox 'non condimentum'",
"reason": "style change"
},
{
"object": "InlineTextBox 'quam est eu'",
"reason": "style change"
},
{
"object": "InlineTextBox 'purus. Ut nisl'",
"reason": "style change"
},
{
"object": "InlineTextBox 'libero,'",
"reason": "style change"
},
{
"object": "InlineTextBox 'suscipit ut leo'",
"reason": "style change"
},
{
"object": "InlineTextBox 'eget, dapibus'",
"reason": "style change"
},
{
"object": "InlineTextBox 'ultrices dolor.'",
"reason": "style change"
},
{
"object": "LayoutMultiColumnSet (anonymous)",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='container'",
"rect": [8, 8, 402, 102],
"reason": "appeared"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [209, 15, 325, 150],
"reason": "chunk uncacheable"
},
{
"object": "InlineTextBox '\u00A0'",
"rect": [9, 0, 200, 67],
"reason": "chunk uncacheable"
},
{
"object": "InlineTextBox '\u00A0'",
"rect": [9, 0, 200, 67],
"reason": "chunk uncacheable"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [209, 15, 75, 150],
"reason": "chunk uncacheable"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"reason": "geometry"
},
{
"object": "RootInlineBox",
"reason": "geometry"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"reason": "geometry"
},
{
"object": "RootInlineBox",
"reason": "geometry"
},
{
"object": "LayoutText #text",
"reason": "geometry"
},
{
"object": "InlineTextBox '\u00A0'",
"reason": "geometry"
},
{
"object": "LayoutText #text",
"reason": "geometry"
},
{
"object": "InlineTextBox '\u00A0'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutInline SPAN id='a'",
"reason": "geometry"
},
{
"object": "InlineFlowBox",
"reason": "geometry"
},
{
"object": "LayoutInline SPAN id='a'",
"reason": "geometry"
},
{
"object": "InlineFlowBox",
"reason": "geometry"
},
{
"object": "LayoutText #text",
"reason": "appeared"
},
{
"object": "InlineTextBox 'XXXXXX'",
"reason": "appeared"
},
{
"object": "LayoutText #text",
"reason": "appeared"
},
{
"object": "InlineTextBox 'XXXXXX'",
"reason": "appeared"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "InlineTextBox 'A green rectangle should be seen above (if tested manually, you need to click first).'",
"rect": [8, 44, 523, 19],
"reason": "appeared"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [488, 8, 80, 20],
"reason": "chunk uncacheable"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='target'",
"reason": "style change"
},
{
"object": "RootInlineBox",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "InlineTextBox 'A green rectangle should be seen above (if tested manually, you need to click first).'",
"rect": [8, 44, 523, 19],
"reason": "appeared"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [483, 8, 85, 80],
"reason": "chunk uncacheable"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutInline SPAN id='target'",
"reason": "style change"
},
{
"object": "LayoutInline SPAN id='target'",
"reason": "style change"
},
{
"object": "LayoutInline SPAN id='target'",
"reason": "style change"
},
{
"object": "LayoutInline SPAN id='target'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "InlineTextBox 'A green rectangle should be seen above (if tested manually, you need to click first).'",
"rect": [8, 44, 523, 19],
"reason": "appeared"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"rect": [483, 8, 85, 80],
"reason": "chunk uncacheable"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"reason": "geometry"
},
{
"object": "RootInlineBox",
"reason": "geometry"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"reason": "geometry"
},
{
"object": "RootInlineBox",
"reason": "geometry"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"reason": "geometry"
},
{
"object": "RootInlineBox",
"reason": "geometry"
},
{
"object": "LayoutMultiColumnFlowThread (anonymous)",
"reason": "geometry"
},
{
"object": "RootInlineBox",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutBR BR",
"reason": "geometry"
},
{
"object": "InlineTextBox '\n'",
"reason": "geometry"
},
{
"object": "LayoutText #text",
"reason": "appeared"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "appeared"
},
{
"object": "LayoutText #text",
"reason": "appeared"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "appeared"
},
{
"object": "LayoutText #text",
"reason": "appeared"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "appeared"
},
{
"object": "LayoutText #text",
"reason": "appeared"
},
{
"object": "InlineTextBox 'PASS'",
"reason": "appeared"
},
{
"object": "LayoutMultiColumnSet (anonymous)",
"reason": "geometry"
}
]
}
...@@ -982,6 +982,24 @@ void PaintLayerPainter::PaintFragmentWithPhase( ...@@ -982,6 +982,24 @@ void PaintLayerPainter::PaintFragmentWithPhase(
ClipState clip_state) { ClipState clip_state) {
DCHECK(paint_layer_.IsSelfPaintingLayer()); DCHECK(paint_layer_.IsSelfPaintingLayer());
Optional<ScopedPaintChunkProperties> fragment_paint_chunk_properties;
if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled() &&
// We have already created paint chunk properties for the first fragment
// in PaintLayerContents().
fragment.fragment_data !=
&paint_layer_.GetLayoutObject().FirstFragment()) {
auto properties =
*fragment.fragment_data->GetRarePaintData()->LocalBorderBoxProperties();
// Keep the current effect which might have been set by
// PaintMaskForFragments().
properties.SetEffect(context.GetPaintController()
.CurrentPaintChunkProperties()
.property_tree_state.Effect());
fragment_paint_chunk_properties.emplace(
context.GetPaintController(), properties, paint_layer_,
DisplayItem::PaintPhaseToDrawingType(phase));
}
DisplayItemClient* client = &paint_layer_.GetLayoutObject(); DisplayItemClient* client = &paint_layer_.GetLayoutObject();
Optional<LayerClipRecorder> clip_recorder; Optional<LayerClipRecorder> clip_recorder;
if (clip_state != kHasClipped && if (clip_state != kHasClipped &&
......
...@@ -80,10 +80,12 @@ class PropertyTreePrinter { ...@@ -80,10 +80,12 @@ class PropertyTreePrinter {
} }
void CollectPropertyNodes(const LayoutObject& object) { void CollectPropertyNodes(const LayoutObject& object) {
if (const ObjectPaintProperties* properties = for (const auto* fragment = &object.FirstFragment(); fragment;
object.FirstFragment().PaintProperties()) fragment = fragment->NextFragment()) {
Traits::AddObjectPaintProperties(object, *properties, *this); if (const auto* properties = fragment->PaintProperties())
for (LayoutObject* child = object.SlowFirstChild(); child; Traits::AddObjectPaintProperties(object, *properties, *this);
}
for (const auto* child = object.SlowFirstChild(); child;
child = child->NextSibling()) child = child->NextSibling())
CollectPropertyNodes(*child); CollectPropertyNodes(*child);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment