Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Issue 2276283002: Include filter-generated content bounds in visual rects (Closed)

Created:
4 years, 3 months ago by pdr.
Modified:
4 years, 3 months ago
CC:
blink-reviews, blink-reviews-layout_chromium.org, blink-reviews-paint_chromium.org, chromium-reviews, dshwang, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, slimming-paint-reviews_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Include filter-generated content bounds in visual rects PaintLayer::mapRectForFilter was used to map from changed bounds in the filtered content to changed bounds once the filter has been applied. For example, an offset filter (FEOffset) would simply apply an offset to the input bounds. PaintLayer::mapRectForFilter was used for calculating the filtered element's visual rect in LayoutBox::inflateVisualRectForReflectionAndFilter. Some filters such as FETurbulence [1] generate filtered output that can fill the entire filtered region (i.e., including object margins). When these filters are used, the visual rect is independent of the paint invalidation rect, so mapRectForFilter has been refactored as "PaintLayer::mapRectToAffectedFilterRegion". This patch uses FilterEffect::determineFilterPrimitiveSubregion to calculate the full filter boundaries in cases like FETurbulence, fixing the visual rect for cases like effect-reference-hidpi.html as well as similar tests with FEImage. [1] https://drafts.fxtf.org/filters/#elementdef-feturbulence BUG=640264 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+19 lines, -13 lines) Patch
M third_party/WebKit/LayoutTests/TestExpectations View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.h View 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 5 chunks +16 lines, -7 lines 2 comments Download

Messages

Total messages: 13 (8 generated)
pdr.
4 years, 3 months ago (2016-08-25 06:50:54 UTC) #6
Stephen White
https://codereview.chromium.org/2276283002/diff/1/third_party/WebKit/Source/core/paint/PaintLayer.cpp File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right): https://codereview.chromium.org/2276283002/diff/1/third_party/WebKit/Source/core/paint/PaintLayer.cpp#newcode2758 third_party/WebKit/Source/core/paint/PaintLayer.cpp:2758: filteredRect.unite(lastEffect->determineFilterPrimitiveSubregion(MapRectForward)); I think this is papering over the problem. ...
4 years, 3 months ago (2016-08-25 15:03:14 UTC) #9
pdr.
On 2016/08/25 at 15:03:14, senorblanco wrote: > https://codereview.chromium.org/2276283002/diff/1/third_party/WebKit/Source/core/paint/PaintLayer.cpp > File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right): > > https://codereview.chromium.org/2276283002/diff/1/third_party/WebKit/Source/core/paint/PaintLayer.cpp#newcode2758 ...
4 years, 3 months ago (2016-08-25 17:55:07 UTC) #11
jbroman
On 2016/08/25 at 17:55:07, pdr wrote: > On 2016/08/25 at 15:03:14, senorblanco wrote: > > ...
4 years, 3 months ago (2016-08-25 23:41:48 UTC) #12
pdr.
4 years, 3 months ago (2016-08-29 17:51:13 UTC) #13
Message was sent while issue was closed.
https://codereview.chromium.org/2276283002/diff/1/third_party/WebKit/Source/c...
File third_party/WebKit/Source/core/paint/PaintLayer.cpp (right):

https://codereview.chromium.org/2276283002/diff/1/third_party/WebKit/Source/c...
third_party/WebKit/Source/core/paint/PaintLayer.cpp:2758:
filteredRect.unite(lastEffect->determineFilterPrimitiveSubregion(MapRectForward));
On 2016/08/25 at 15:03:14, Stephen White wrote:
> I think this is papering over the problem. I think the real problem is that we
need to expose a flavour of FilterOperations::mapRect() which calls
FilterEffect::mapPaintRect().
> 
> See the comment here, which explicitly calls out tile and displacement map:
> 
>
https://cs.chromium.org/chromium/src/third_party/WebKit/Source/platform/graph...
> 
> OTOH, it would be nice if we could unite FilterEffect::mapRect() and
FilterEffect::mapPaintRect(). The latter was added by someone other than me, and
we should figure out what the differences really are for the paint case and why
they don't apply to the other cases. That's not clear to me.
> 
> Also, jbroman@ should probably take a look at this.

I've filed https://crbug.com/642035 as a brain-dump of my findings in this
patch. We do need to combine mapRect and mapPaintRect and use the result in
PaintLayer::mapRectForFilter, but this is a large project.

Powered by Google App Engine
This is Rietveld 408576698