Commit 00e7d7b1 authored by Xianzhu Wang's avatar Xianzhu Wang Committed by Commit Bot

[SPv175+] Correct translation for filters

With this CL, ~10 layout tests under paint/ are now passing on SPv175+.
Most of the rebaselines are just for different invalidation reasons.

Bug: 771643
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: I181d50b6808b2e44a84c105577d4271cb47b5b78
Reviewed-on: https://chromium-review.googlesource.com/759296Reviewed-by: default avatarChris Harrelson <chrishtr@chromium.org>
Commit-Queue: Xianzhu Wang <wangxianzhu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#515096}
parent 4edfe754
......@@ -978,17 +978,6 @@ Bug(none) paint/invalidation/svg/use-detach.svg [ Failure ]
Bug(none) paint/invalidation/window-resize-percent-html.html [ Failure ]
# Different invalidation rect or corrupted rendering for filter and reflection.
Bug(none) paint/invalidation/filter-invalidation-positioned-child.html [ Failure ]
Bug(none) paint/invalidation/filter-repaint-accelerated-on-accelerated-filter.html [ Failure ]
Bug(none) paint/invalidation/filters/effect-reference-repaint-composite-1.html [ Failure ]
Bug(none) paint/invalidation/filters/effect-reference-repaint-composite-2.html [ Failure ]
Bug(none) paint/invalidation/filters/effect-reference-repaint-composite-5.html [ Failure ]
Bug(none) paint/invalidation/filters/effect-reference-repaint-lighting.html [ Failure ]
Bug(none) paint/invalidation/reflection-invalidation-after-display.html [ Failure ]
Bug(none) paint/invalidation/reflection-invalidation-positioned-child.html [ Failure ]
Bug(none) paint/invalidation/reflection-redraw.html [ Failure ]
Bug(none) paint/invalidation/scroll-fixed-layer-with-reflection.html [ Failure ]
Bug(none) paint/invalidation/scroll-fixed-reflected-layer.html [ Failure ]
Bug(none) paint/invalidation/svg/filter-refresh.svg [ Failure ]
Bug(none) paint/invalidation/svg/paintorder-filtered.svg [ Failure ]
......
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [8, 8, 772, 572],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [8, 8, 722, 522],
"reason": "paint property change"
}
]
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='before box'",
"rect": [128, 120, 100, 100],
"reason": "paint property change"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='box'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='before box'",
"rect": [128, 120, 200, 200],
"reason": "paint property change"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='box'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='before box'",
"rect": [128, 120, 100, 100],
"reason": "paint property change"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='box'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='box'",
"rect": [78, 70, 100, 100],
"reason": "appeared"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV class='box'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV id='box' class='green reflected box'",
"rect": [300, 8, 450, 200],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV id='box' class='green box'",
"rect": [300, 8, 200, 200],
"reason": "paint property change"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV id='box' class='green box'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [0, 0, 450, 220],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [0, 0, 450, 200],
"reason": "paint property change"
}
]
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-right'",
"rect": [368, 240, 310, 100],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-left'",
"rect": [58, 240, 310, 100],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-bottom'",
"rect": [293, 350, 150, 210],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-top'",
"rect": [293, 20, 150, 210],
"reason": "paint property change"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 2016],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute green reflected'",
"rect": [250, 280, 100, 100],
"reason": "appeared"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute red'",
"rect": [250, 280, 100, 100],
"reason": "disappeared"
}
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -180, 0, 1]
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV id='moveMe' class='fixed clipped'",
"reason": "subtree"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute green reflected'",
"reason": "subtree"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute red'",
"reason": "subtree"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 2016],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute green reflected'",
"rect": [250, 280, 100, 100],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV id='hideMe' class='absolute red'",
"rect": [250, 280, 100, 100],
"reason": "paint property change"
}
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -180, 0, 1]
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV id='hideMe' class='absolute red'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [8, 8, 772, 572],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [8, 8, 722, 522],
"reason": "paint property change"
}
]
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF"
},
{
"name": "LayoutBlockFlow DIV id='resize' class='drop-shadow accelerated'",
"position": [-14, -14],
"bounds": [160, 260],
"backgroundColor": "#008000",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='resize' class='drop-shadow accelerated'",
"rect": [0, 0, 160, 260],
"reason": "geometry"
}
],
"transform": 1
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[8, 8, 0, 1]
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='resize' class='drop-shadow accelerated'",
"reason": "geometry"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [0, 0, 450, 220],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow DIV id='box'",
"rect": [0, 0, 450, 200],
"reason": "paint property change"
}
]
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 600],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"paintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-right'",
"rect": [368, 240, 310, 100],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-left'",
"rect": [58, 240, 310, 100],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-bottom'",
"rect": [293, 350, 150, 210],
"reason": "paint property change"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='box reflect-top'",
"rect": [293, 20, 150, 210],
"reason": "paint property change"
}
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
},
{
"object": "LayoutText #text",
"reason": "style change"
},
{
"object": "InlineTextBox 'The color of this'",
"reason": "style change"
},
{
"object": "InlineTextBox 'text in the reflection'",
"reason": "style change"
},
{
"object": "InlineTextBox 'should be green'",
"reason": "style change"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 2016],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"transform": 1
},
{
"name": "LayoutBlockFlow (positioned) DIV class='absolute green reflected'",
"position": [150, 150],
"bounds": [100, 100],
"backgroundColor": "#008000",
"transform": 3
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -180, 0, 1]
],
"flattenInheritedTransform": false
},
{
"id": 2,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[250, 100, 0, 1]
]
},
{
"id": 3,
"parent": 2,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[-150, -150, 0, 1]
]
}
],
"objectPaintInvalidations": [
{
"object": "LayoutBlockFlow (positioned) DIV id='moveMe' class='fixed clipped'",
"reason": "geometry"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute green reflected'",
"reason": "geometry"
},
{
"object": "LayoutBlockFlow (positioned) DIV class='absolute red'",
"reason": "geometry"
}
]
}
{
"layers": [
{
"name": "LayoutView #document",
"bounds": [800, 2016],
"contentsOpaque": true,
"backgroundColor": "#FFFFFF",
"transform": 1
},
{
"name": "LayoutBlockFlow (positioned) DIV id='hideMe' class='absolute red'",
"bounds": [350, 200],
"backgroundColor": "#FF0000"
}
],
"transforms": [
{
"id": 1,
"transform": [
[1, 0, 0, 0],
[0, 1, 0, 0],
[0, 0, 1, 0],
[0, -180, 0, 1]
],
"flattenInheritedTransform": false
}
]
}
......@@ -315,9 +315,9 @@ void ConversionContext::SwitchToEffect(
target_transform, current_transform_))));
}
// TODO(chrishtr): specify origin of the filter.
FloatPoint filter_origin;
cc_list_.push<cc::TranslateOp>(filter_origin.X(), filter_origin.Y());
FloatPoint filter_origin = sub_effect->PaintOffset();
if (filter_origin != FloatPoint())
cc_list_.push<cc::TranslateOp>(filter_origin.X(), filter_origin.Y());
// The size parameter is only used to computed the origin of zoom
// operation, which we never generate.
gfx::SizeF empty;
......@@ -325,7 +325,8 @@ void ConversionContext::SwitchToEffect(
filter_flags.setImageFilter(cc::RenderSurfaceFilters::BuildImageFilter(
sub_effect->Filter().AsCcFilterOperations(), empty));
cc_list_.push<cc::SaveLayerOp>(nullptr, &filter_flags);
cc_list_.push<cc::TranslateOp>(-filter_origin.X(), -filter_origin.Y());
if (filter_origin != FloatPoint())
cc_list_.push<cc::TranslateOp>(-filter_origin.X(), -filter_origin.Y());
cc_list_.EndPaintOfPairedBegin();
......
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