A FilterEffect should be applied to any input FilterImages and results a FilterImage. These FilterImages will managed by the Filter class and should be cached by the creator of the source ImageBuffer. In the case of the GPU Process, they will be cached by RemoteResourceCache.
<rdar://problem/85425842>
Created attachment 448280 [details] Patch
Created attachment 448302 [details] Patch
Comment on attachment 448302 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448302&action=review > Source/WebCore/platform/graphics/filters/FilterResults.cpp:40 > + for (auto input : inputs) { Using "auto" here means we copy each Ref<FilterImage>. I think that instead we should use "auto&" and save a bit of reference count churn. > Source/WebCore/platform/graphics/filters/FilterResults.cpp:46 > + auto addResult = m_resultReferences.ensure(input, [] { > + return FilterEffectSet(); > + }); > + > + auto& references = addResult.iterator->value; > + references.add(effect); This can just use add, because FilterEffectSet() is a null pointer, very cheap to construct and destruct. Can write this as a one-liner. m_resultReferences.add(input, { }).iterator->value.add(effect); > Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h:52 > + void appendEffectToEffectRenderer(FilterEffect*, RenderObject*); This should take a FilterEffect& instead of a FilterEffect*.
Created attachment 448605 [details] Patch
Committed r287782 (245842@main): <https://commits.webkit.org/245842@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448605 [details].