Bug 236573

Summary: [GPU Process] Make SVGFEImageElement::filterEffect() create an ImageBuffer compatible with the destination GraphicsContext
Product: WebKit Reporter: Said Abou-Hallawa <sabouhallawa>
Component: Layout and RenderingAssignee: Said Abou-Hallawa <sabouhallawa>
Status: RESOLVED FIXED    
Severity: Normal CC: bfulgham, changseok, dino, esprehn+autocc, ews-watchlist, fmalita, fred.wang, glenn, gyuyoung.kim, kondapallykalyan, macpherson, menard, pdr, schenney, sergio, simon.fraser, webkit-bug-importer, zalan
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 236574    
Bug Blocks: 236508    
Attachments:
Description Flags
Patch
simon.fraser: review+
Patch none

Description Said Abou-Hallawa 2022-02-13 15:56:04 PST
This requires passing a GraphicsContext to SVGFilter::create() and CSSFilter::create(). This already can be done for SVGFilter since it is created in RenderSVGResourceFilter::applyResource(). But creating the CSSFilter is a little problematic.
Comment 1 Radar WebKit Bug Importer 2022-02-20 15:57:17 PST
<rdar://problem/89209695>
Comment 2 Said Abou-Hallawa 2022-04-04 22:02:39 PDT
Created attachment 456668 [details]
Patch
Comment 3 Simon Fraser (smfr) 2022-04-05 12:34:00 PDT
Comment on attachment 456668 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=456668&action=review

> Source/WebCore/rendering/CSSFilter.cpp:259
> +static RefPtr<SVGFilter> createReferenceFilter(CSSFilter& filter, const ReferenceFilterOperation& filterOperation, RenderElement& renderer, const FloatRect& targetBoundingBox, const GraphicsContext& context)

Can we all it "destinationContext" to avoid any ambiguity with contexts related to the filter's internal buffers.

> Source/WebCore/rendering/CSSFilter.cpp:271
> +bool CSSFilter::buildFilterFunctions(RenderElement& renderer, const FilterOperations& operations, const FloatRect& targetBoundingBox, const GraphicsContext& context)

Ditto
Comment 4 Said Abou-Hallawa 2022-04-06 12:37:53 PDT
Created attachment 456850 [details]
Patch
Comment 5 EWS 2022-04-06 15:42:50 PDT
Committed r292512 (249354@main): <https://commits.webkit.org/249354@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 456850 [details].