Skip to content

Commit 8428c6d

Browse files
shallawaSaid Abou-Hallawa
authored andcommitted
[Filters] Disable CoreGraphics blur and drop-shadow filters
https://bugs.webkit.org/show_bug.cgi?id=305034 rdar://166631624 The CoreGraphics filters will be turned off until system frameworks bugs are fixed. Also the workaround which was added in 299903@main will be reverted. Reviewed by Simon Fraser. * LayoutTests/fast/filter-image/clipped-filter-expected.html: * LayoutTests/fast/filter-image/clipped-filter.html: * LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur.html: * LayoutTests/platform/mac-wk2/TestExpectations: * Source/WebCore/platform/graphics/filters/FEDropShadow.cpp: (WebCore::FEDropShadow::supportedFilterRenderingModes const): * Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp: (WebCore::FEGaussianBlur::supportedFilterRenderingModes const): (WebCore::FEGaussianBlur::createGraphicsStyle const): Canonical link: https://commits.webkit.org/305216@main
1 parent 273c638 commit 8428c6d

File tree

6 files changed

+6
-16
lines changed

6 files changed

+6
-16
lines changed

LayoutTests/fast/filter-image/clipped-filter-expected.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<svg>
4444
<defs>
4545
<clipPath id="clipPath">
46-
<path d="M18,38 v200 h90 a150,150 0 0,1 300,0 h50 v-200 z"
46+
<path d="M18,38 v200 h90 a150,150 0 0,1 300,0 h50 v-200 z">
4747
</clipPath>
4848
</defs>
4949
</svg>

LayoutTests/fast/filter-image/clipped-filter.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
<html>
44
<head>
5-
<meta name="fuzzy" content="maxDifference=0-5; totalPixels=0-5" />
5+
<meta name="fuzzy" content="maxDifference=0-75; totalPixels=0-132" />
66
<style>
77
.circle {
88
width: 300px;

LayoutTests/imported/w3c/web-platform-tests/html/canvas/element/manual/filters/canvas-filter-shadow-and-properties-blur.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!DOCTYPE html>
22
<link rel="match" href="canvas-filter-shadow-and-properties-blur-expected.html"/>
3-
<meta name="fuzzy" content="maxDifference=0-13; totalPixels=0-25600">
3+
<meta name="fuzzy" content="maxDifference=0-35; totalPixels=0-25600">
44
<body>
55
<canvas id="canvas" width="300" height="300"></canvas>
66
</body>

LayoutTests/platform/mac-wk2/TestExpectations

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2385,8 +2385,6 @@ webkit.org/b/299830 imported/w3c/web-platform-tests/storage-access-api/hasStorag
23852385

23862386
webkit.org/b/299826 [ Release x86_64 ] media/modern-media-controls/media-controller/media-controller-click-on-video-background-should-pause.html [ Crash ]
23872387

2388-
webkit.org/b/300864 imported/w3c/web-platform-tests/css/css-viewport/zoom/filters-drop-shadow.html [ Pass ImageOnlyFailure ]
2389-
23902388
webkit.org/b/301153 [ Debug ] fast/parser/entity-comment-in-textarea.html [ Pass Timeout ]
23912389

23922390
webkit.org/b/301566 [ Debug ] imported/w3c/web-platform-tests/custom-elements/registries/Element-innerHTML.html [ Skip ]

Source/WebCore/platform/graphics/filters/FEDropShadow.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ OptionSet<FilterRenderingMode> FEDropShadow::supportedFilterRenderingModes(Optio
147147
#if (USE(CORE_IMAGE)) || (USE(SKIA))
148148
modes.add(FilterRenderingMode::Accelerated);
149149
#endif
150-
#if USE(CG)
150+
#if USE(CG) && HAVE(FIX_FOR_RADAR_163968203)
151151
if (m_stdX == m_stdY)
152152
modes.add(FilterRenderingMode::GraphicsContext);
153153
#endif

Source/WebCore/platform/graphics/filters/FEGaussianBlur.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ OptionSet<FilterRenderingMode> FEGaussianBlur::supportedFilterRenderingModes(Opt
168168
modes.add(FilterRenderingMode::Accelerated);
169169
#endif
170170
// FIXME: Ensure the correctness of the CG GaussianBlur filter (http://webkit.org/b/243816).
171-
#if HAVE(CGSTYLE_COLORMATRIX_BLUR)
171+
#if HAVE(CGSTYLE_COLORMATRIX_BLUR) && HAVE(FIX_FOR_RADAR_163968203) && HAVE(FIX_FOR_RADAR_160309842)
172172
if (m_stdX == m_stdY && preferredFilterRenderingModes.contains(FilterRenderingMode::GraphicsContext))
173173
modes.add(FilterRenderingMode::GraphicsContext);
174174
#endif
@@ -195,16 +195,8 @@ std::unique_ptr<FilterEffectApplier> FEGaussianBlur::createSoftwareApplier() con
195195
return FilterEffectApplier::create<FEGaussianBlurSoftwareApplier>(*this);
196196
}
197197

198-
std::optional<GraphicsStyle> FEGaussianBlur::createGraphicsStyle(GraphicsContext& context, const Filter& filter) const
198+
std::optional<GraphicsStyle> FEGaussianBlur::createGraphicsStyle(GraphicsContext&, const Filter& filter) const
199199
{
200-
#if PLATFORM(COCOA) && !HAVE(FIX_FOR_RADAR_160309842)
201-
if (context.renderingMode() == RenderingMode::Accelerated) {
202-
auto radius = calculateKernelSize(filter, { m_stdX, m_stdY });
203-
return GraphicsGaussianBlur { radius };
204-
}
205-
#else
206-
UNUSED_PARAM(context);
207-
#endif
208200
auto radius = calculateUnscaledKernelSize(filter.resolvedSize({ m_stdX, m_stdY }));
209201
return GraphicsGaussianBlur { radius };
210202
}

0 commit comments

Comments
 (0)