Commit 4e5cbded authored by Justin Donnelly's avatar Justin Donnelly Committed by Commit Bot

Revert "[SPv175] Support incremental invalidation on scrolling contents layer"

This reverts commit 7ac572d1.

Reason for revert: Reverting on suspicion of breaking webkit_layout_tests on many Mac bots. See, e.g.:

https://build.chromium.org/p/chromium.mac/builders/Mac10.12%20Tests/builds/6891
https://build.chromium.org/p/chromium.mac/builders/Mac10.10%20Tests/builds/25624

-- Chromium sheriff

Original change's description:
> [SPv175] Support incremental invalidation on scrolling contents layer
> 
> When the scrolling contents layer is resized and it paints the
> background, we should invalidate the expanded/shrunk part of the
> background. For SPv1 this is done by calling IncrementallyInvalidatePaint.
> For SPv175 we need to pass kIncremental reason to PaintController.
> 
> Bug: 732611
> Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
> Change-Id: I501ed3e899282b31f4f9d461e23637ab1ca4460d
> Reviewed-on: https://chromium-review.googlesource.com/749283
> Reviewed-by: Philip Rogers <pdr@chromium.org>
> Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#513221}

TBR=wangxianzhu@chromium.org,pdr@chromium.org

Change-Id: I534c53fc28e9d657bbc7759aa80ac84cee065beb
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 732611
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Reviewed-on: https://chromium-review.googlesource.com/750001Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Justin Donnelly <jdonnelly@chromium.org>
Cr-Commit-Position: refs/heads/master@{#513278}
parent 7fa8f03f
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutBlockFlow DIV id='container'",
"position": [8, 8],
"bounds": [400, 400],
"backgroundColor": "#0000FF"
},
{
"name": "Scrolling Layer",
"position": [8, 8],
"bounds": [400, 400],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"position": [8, 8],
"bounds": [400, 2000],
"contentsOpaque": true,
"backgroundColor": "#0000FF",
"paintInvalidations": [
{
"object": "Scrolling Contents Layer",
"rect": [0, 500, 400, 1500],
"reason": "incremental"
}
],
"transform": 1
},
{
"name": "Overflow Controls Host Layer",
"position": [8, 8],
"bounds": [400, 400],
"drawsContent": false
},
{
"name": "Horizontal Scrollbar Layer",
"position": [8, 408],
"bounds": [400, 0]
},
{
"name": "Vertical Scrollbar Layer",
"position": [408, 8],
"bounds": [0, 400]
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -1600, 0, 1]
],
"flattenInheritedTransform": false
}
],
"objectPaintInvalidations": [
{
"object": "Scrolling Contents Layer",
"reason": "incremental"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutBlockFlow DIV id='container'",
"position": [8, 8],
"bounds": [400, 400],
"backgroundColor": "#0000FF"
},
{
"name": "Scrolling Layer",
"position": [8, 8],
"bounds": [400, 400],
"drawsContent": false
},
{
"name": "Scrolling Contents Layer",
"position": [8, 8],
"bounds": [400, 2000],
"contentsOpaque": true,
"backgroundColor": "#0000FF",
"paintInvalidations": [
{
"object": "Scrolling Contents Layer",
"rect": [0, 500, 400, 1500],
"reason": "incremental"
}
],
"transform": 1
},
{
"name": "Overflow Controls Host Layer",
"position": [8, 8],
"bounds": [400, 400],
"drawsContent": false
},
{
"name": "Horizontal Scrollbar Layer",
"position": [8, 408],
"bounds": [400, 0]
},
{
"name": "Vertical Scrollbar Layer",
"position": [408, 8],
"bounds": [0, 400]
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -1600, 0, 1]
],
"flattenInheritedTransform": false
}
],
"objectPaintInvalidations": [
{
"object": "Scrolling Contents Layer",
"reason": "incremental"
}
]
}
......@@ -227,38 +227,35 @@ BoxPaintInvalidator::ComputeBackgroundInvalidation() {
}
void BoxPaintInvalidator::InvalidateScrollingContentsBackground(
BackgroundInvalidationType background_invalidation_type) {
BackgroundInvalidationType backgroundInvalidationType) {
if (!BackgroundPaintsOntoScrollingContentsLayer())
return;
if (background_invalidation_type == BackgroundInvalidationType::kNone)
if (backgroundInvalidationType == BackgroundInvalidationType::kNone)
return;
PaintInvalidationReason reason;
if (RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) {
reason = background_invalidation_type == BackgroundInvalidationType::kFull
? PaintInvalidationReason::kBackgroundOnScrollingContentsLayer
: PaintInvalidationReason::kIncremental;
} else {
// For SPv1 we need this reason for both full and incremental invalidation
// to let ObjectPaintInvalidator::SetBackingNeedsPaintInvalidationInRect()
// know we are invalidating on the scrolling contents backing.
reason = PaintInvalidationReason::kBackgroundOnScrollingContentsLayer;
// TODO(crbug.com/732611): Implement raster invalidation of background on
// scrolling contents layer for SPv175.
if (!RuntimeEnabledFeatures::SlimmingPaintV175Enabled()) {
const LayoutRect& old_layout_overflow = box_.PreviousLayoutOverflowRect();
LayoutRect new_layout_overflow = box_.LayoutOverflowRect();
if (background_invalidation_type == BackgroundInvalidationType::kFull) {
if (backgroundInvalidationType == BackgroundInvalidationType::kFull) {
ObjectPaintInvalidatorWithContext(box_, context_)
.FullyInvalidatePaint(reason, old_layout_overflow,
new_layout_overflow);
.FullyInvalidatePaint(
PaintInvalidationReason::kBackgroundOnScrollingContentsLayer,
old_layout_overflow, new_layout_overflow);
} else {
IncrementallyInvalidatePaint(reason, old_layout_overflow,
new_layout_overflow);
IncrementallyInvalidatePaint(
PaintInvalidationReason::kBackgroundOnScrollingContentsLayer,
old_layout_overflow, new_layout_overflow);
}
}
context_.painting_layer->SetNeedsRepaint();
// Currently we use CompositedLayerMapping as the DisplayItemClient to paint
// background on the scrolling contents layer.
ObjectPaintInvalidator(box_).InvalidateDisplayItemClient(
*box_.Layer()->GetCompositedLayerMapping()->ScrollingContentsLayer(),
reason);
PaintInvalidationReason::kBackgroundOnScrollingContentsLayer);
}
PaintInvalidationReason BoxPaintInvalidator::InvalidatePaint() {
......
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