CSSFilter::create() is called twice: (1) while doing the layout and creating the page layers. This call is mainly for calculating the filter outsets which is used for layer clipping. In this case we do not have a GraphicsContext (2) while painting in RenderLayerFilters::beginFilterEffect(). In this case we do have a GraphicsContext Building whole filter chain just to calculate the filter outsets is wrong. Instead we can use the FilterOperation and SVGFilterPrimitiveStandardAttributes superclasses to get their outsets without having to build the FilterEffects.
Created attachment 451846 [details] Patch
Created attachment 451858 [details] Patch
Comment on attachment 451858 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=451858&action=review > Source/WebCore/rendering/RenderLayerFilters.h:77 > + RenderingMode m_renderingMode; Let's default-initialize this.
<rdar://problem/89210004>
Created attachment 455955 [details] Patch
Created attachment 455965 [details] Patch
Created attachment 456001 [details] Patch
Created attachment 456626 [details] Patch
Committed r292364 (249229@main): <https://commits.webkit.org/249229@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 456626 [details].