The Filter will pass the input FilterImages to the FilterEffect::apply() and will receive the result FilterImage. There is no actual need for aFilterEffect to access the input FilterEffects.
<rdar://problem/85425930>
Created attachment 448798 [details] Patch
Comment on attachment 448798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448798&action=review Looks good, assuming tests are all passing. > Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h:62 > + std::optional<FilterEffectVector> namedEffects(const Vector<AtomString>&) const; I’d suggest Span<AtomString> instead as the argument type here.
Created attachment 448820 [details] Patch
Comment on attachment 448798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448798&action=review >> Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h:62 >> + std::optional<FilterEffectVector> namedEffects(const Vector<AtomString>&) const; > > I’d suggest Span<AtomString> instead as the argument type here. All FilterEffects, except FEMerge, have fixed number of inputs. FEMerge can have variable number of inputs. So I think Span can't be used in this case.
Comment on attachment 448798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448798&action=review >>> Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h:62 >>> + std::optional<FilterEffectVector> namedEffects(const Vector<AtomString>&) const; >> >> I’d suggest Span<AtomString> instead as the argument type here. > > All FilterEffects, except FEMerge, have fixed number of inputs. FEMerge can have variable number of inputs. So I think Span can't be used in this case. Not sure why you say that. Span can have a fixed number, but I am suggesting a Span with a variable number. Span *definitely* can be used. And what it does is allow a caller to call this without constructing a Vector, or call with a Vector.
Created attachment 448857 [details] Patch
Comment on attachment 448798 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=448798&action=review >>>> Source/WebCore/svg/graphics/filters/SVGFilterBuilder.h:62 >>>> + std::optional<FilterEffectVector> namedEffects(const Vector<AtomString>&) const; >>> >>> I’d suggest Span<AtomString> instead as the argument type here. >> >> All FilterEffects, except FEMerge, have fixed number of inputs. FEMerge can have variable number of inputs. So I think Span can't be used in this case. > > Not sure why you say that. Span can have a fixed number, but I am suggesting a Span with a variable number. > > Span *definitely* can be used. And what it does is allow a caller to call this without constructing a Vector, or call with a Vector. Sorry I misunderstood your suggestion. I thought you suggest changing the functions filterEffectInputsNames() also to return Span<AtomString>. Fixed in the latest patch.
Committed r287892 (245930@main): <https://commits.webkit.org/245930@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 448857 [details].