This will allow caching the FilterResults along with the SVGFilter in RemoteResourceCache. The solution has to consider the following cases for the SVGFilter & FilterResults: a. SVGFilter is created in WebProcess: 1. Rendering in WebProcess: i. Top level SVGFilter: SVGFilter creates its FilterResults. SVGFilter caches its FilterResults (will be implemented by this bug). ii. Referenced SVGFilter: SVGFilter should not create FilterResults. 2. Rendering in GPUProcess: i. Top level SVGFilter: SVGFilter should not create FilterResults (will be fixed by this bug). ii. Referenced SVGFilter: SVGFilter should not create FilterResults. b. SVGFilter is created in GPUProcess: 1. Rendering in GPUProcess: i. Top level SVGFilter: SVGFilter creates its FilterResults (Memory has to be attributed to WebProcess). SVGFilter caches its FilterResults (will be implemented in another bug). ii. Referenced SVGFilter: SVGFilter should not create FilterResults. To do that GraphicsContext::drawFilteredImageBuffer() has to take FilterResultsEnsurer which returns FilterResults&. drawFilteredImageBuffer() will call it only when the FilterResults is needed. SVGFilter::ensureResults() will return FilterResults& and it takes FilterResultsCreator. FilterResultsCreator will return a std::unique_ptr<FilterResults> which SVGFilter will maintain.
<rdar://problem/109107572>
Pull request: https://github.com/apple/WebKit/pull/587
Pull request: https://github.com/WebKit/WebKit/pull/13652
Pull request: https://github.com/WebKit/WebKit/pull/13676
Committed 263996@main (b860110f0ae4): <https://commits.webkit.org/263996@main> Reviewed commits have been landed. Closing PR #13676 and removing active labels.