[webkit-reviews] review granted: [Bug 233893] [GPU Process] [Filters] Make FilterEffect::externalRepresentation() and its overridable functions work iteratively : [Attachment 446109] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 6 19:54:05 PST 2021


Cameron McCormack (:heycam) <heycam at apple.com> has granted Said Abou-Hallawa
<sabouhallawa at apple.com>'s request for review:
Bug 233893: [GPU Process]  [Filters] Make
FilterEffect::externalRepresentation() and its overridable functions work
iteratively
https://bugs.webkit.org/show_bug.cgi?id=233893

Attachment 446109: Patch

https://bugs.webkit.org/attachment.cgi?id=446109&action=review




--- Comment #3 from Cameron McCormack (:heycam) <heycam at apple.com> ---
Comment on attachment 446109
  --> https://bugs.webkit.org/attachment.cgi?id=446109
Patch

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

> Source/WebCore/platform/graphics/filters/FEBlend.cpp:63
> +    {

No need for the block (and in all other externalRepresentation functions that
don't use an IndentScope).

> Source/WebCore/rendering/CSSFilter.cpp:419
> +	   TextStream::IndentScope indentScope(ts, level++);

Is there a need to indent? I don't think it provides any information.

> Source/WebCore/svg/graphics/filters/SVGFilter.cpp:140
> +    auto end = m_expression.rend();
> +
> +    for (auto it = m_expression.rbegin(); it != end; ++it) {

Probably more idiomatic to write this as:

for (auto it = m_expression.rbegin(), end = m_expression.rend(); it != end;
++it)

> Source/WebCore/svg/graphics/filters/SVGFilter.cpp:147
> +	   TextStream::IndentScope indentScope(ts, term.level);

Similarly, is it useful to represent the depth in the filter DAG as the indent
level? What makes me doubt this is that it doesn't fully encode the
dependencies between the nodes in the filter graph, e.g. if two filter effects
depend on the one other filter effect.

> Source/WebCore/svg/graphics/filters/SVGFilterBuilder.cpp:220
> +    expression.append({ *effect, effectGeometry(*effect), level });

I don't think we should bother computing and storing the level. Unless it's
needed for something other than externalRepresentation.


More information about the webkit-reviews mailing list