-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[Filters] Applying CoreGraphics filters on different tiles may result in white borders around the tiles #50371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
EWS run on previous version of this PR (hash 313760f) |
smfr
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This needs a test.
| destinationContext.clip(intersection(filterStyle.imageRect, clipRect)); | ||
|
|
||
| auto maxSide = filterStyle.outsets.maxSide(); | ||
| auto outsets = FloatBoxExtent { maxSide, maxSide, maxSide, maxSide }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we have to take the max of the outsets, rather than just expanding by the appropriate amount on each side?
|
|
||
| inline FloatBoxExtent operator-(const FloatRect& a, const FloatRect& b) | ||
| { | ||
| return FloatBoxExtent { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this clamp negative to zero, so we don't return negative extents?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we have
FloatRect a = { 0, 0, 3, 3 };
FloatRect b = { 1, 1, 1, 1 };
FloatBoxExtent c = a - b; // c = { 1, 1, 1, 1 };
FloatBoxExtent c = b - a; // Should d = { -1, -1, -1, -1 }? Or should d = { 0, 0, 0, 0 }?
I think the result should be signed. If the rect edge is positive, this means a - b is expanded in this direction. If the rect edge is negative, this means a -b is shrunk in this direction.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It turned out this part is not needed to fix this bug.
313760f to
f71edec
Compare
|
EWS run on previous version of this PR (hash f71edec) |
f71edec to
df76b85
Compare
|
EWS run on previous version of this PR (hash df76b85) |
df76b85 to
0f60c45
Compare
|
EWS run on previous version of this PR (hash 0f60c45) |
0f60c45 to
7dd209d
Compare
|
EWS run on current version of this PR (hash 7dd209d) |
… in white borders around the tiles https://bugs.webkit.org/show_bug.cgi?id=298453 rdar://159951868 Reviewed by Simon Fraser. The transparency layer of the CoreGraphics filter should be clipped to the layer backgroundClipRect without intersecting it with the paintDirtyRect. CoreGraphics expects the context is set to the coordinates of the target filtered renderer not only the dirty rectangle only. Test: css3/filters/effect-graphics-context-blur-tile-boundaries.html * LayoutTests/css3/filters/effect-graphics-context-blur-tile-boundaries-expected.html: Added. * LayoutTests/css3/filters/effect-graphics-context-blur-tile-boundaries.html: Added. * Source/WebCore/rendering/LayerFragment.h: (WebCore::LayerFragment::Rects::backgroundRect const): (WebCore::LayerFragment::backgroundRect const): * Source/WebCore/rendering/RenderLayer.cpp: (WebCore::RenderLayer::paintLayerContents): Canonical link: https://commits.webkit.org/300038@main
7dd209d to
0bd4123
Compare
|
Committed 300038@main (0bd4123): https://commits.webkit.org/300038@main Reviewed commits have been landed. Closing PR #50371 and removing active labels. |


0bd4123
7dd209d