Skip to content

Commit

Permalink
Merge r269837 - [TextureMapper] The edges of blur backdrop-filter loo…
Browse files Browse the repository at this point in the history
…k gradient tranparent

https://bugs.webkit.org/show_bug.cgi?id=218645
<rdar://problem/71356999>

Reviewed by Carlos Garcia Campos.

Source/WebCore:

The blur backdrop-filter needs a larger input image than an output
image. However, it's not easy to get a larger input image in the
edges of the windows. Cocoa port is doing extrapolation by
duplicating edges pixels of the input image which has the same
size with the output image (Bug 146215). Take the same approach.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computeOverlapRegions): Don't
inflate the local bounding rect by the outsets for backdrop
layers.
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(sampleColorAtRadius): Don't clamp 'coord'.

LayoutTests:

* platform/glib/css3/filters/backdrop/blur-input-bounds-expected.png: Added.
  • Loading branch information
fujii authored and carlosgcampos committed Nov 20, 2020
1 parent 01a0849 commit 531ac65
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 2 deletions.
10 changes: 10 additions & 0 deletions LayoutTests/ChangeLog
@@ -1,3 +1,13 @@
2020-11-16 Fujii Hironori <Hironori.Fujii@sony.com>

[TextureMapper] The edges of blur backdrop-filter look gradient tranparent
https://bugs.webkit.org/show_bug.cgi?id=218645
<rdar://problem/71356999>

Reviewed by Carlos Garcia Campos.

* platform/glib/css3/filters/backdrop/blur-input-bounds-expected.png: Added.

2020-11-13 Miguel Gomez <magomez@igalia.com>

[GTK][WPE] CSS backdrop overlay corners are not rounded on results.webkit.org
Expand Down
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions Source/WebCore/ChangeLog
@@ -1,3 +1,24 @@
2020-11-16 Fujii Hironori <Hironori.Fujii@sony.com>

[TextureMapper] The edges of blur backdrop-filter look gradient tranparent
https://bugs.webkit.org/show_bug.cgi?id=218645
<rdar://problem/71356999>

Reviewed by Carlos Garcia Campos.

The blur backdrop-filter needs a larger input image than an output
image. However, it's not easy to get a larger input image in the
edges of the windows. Cocoa port is doing extrapolation by
duplicating edges pixels of the input image which has the same
size with the output image (Bug 146215). Take the same approach.

* platform/graphics/texmap/TextureMapperLayer.cpp:
(WebCore::TextureMapperLayer::computeOverlapRegions): Don't
inflate the local bounding rect by the outsets for backdrop
layers.
* platform/graphics/texmap/TextureMapperShaderProgram.cpp:
(sampleColorAtRadius): Don't clamp 'coord'.

2020-11-13 Miguel Gomez <magomez@igalia.com>

[GTK][WPE] CSS backdrop overlay corners are not rounded on results.webkit.org
Expand Down
Expand Up @@ -326,7 +326,7 @@ void TextureMapperLayer::computeOverlapRegions(ComputeOverlapRegionData& data, c
else if (m_contentsLayer || m_state.solidColor.isVisible())
localBoundingRect = m_state.contentsRect;

if (m_currentFilters.hasOutsets()) {
if (m_currentFilters.hasOutsets() && !m_state.backdropLayer) {
auto outsets = m_currentFilters.outsets();
localBoundingRect.move(-outsets.left(), -outsets.top());
localBoundingRect.expand(outsets.left() + outsets.right(), outsets.top() + outsets.bottom());
Expand Down
Expand Up @@ -362,7 +362,7 @@ static const char* fragmentTemplateCommon =
vec4 sampleColorAtRadius(float radius, vec2 texCoord)
{
vec2 coord = texCoord + radius * u_blurRadius;
return SamplerFunction(s_sampler, coord) * float(coord.x > 0. && coord.y > 0. && coord.x < 1. && coord.y < 1.);
return SamplerFunction(s_sampler, coord);
}

float sampleAlphaAtRadius(float radius, vec2 texCoord)
Expand Down

0 comments on commit 531ac65

Please sign in to comment.