Open Bug 1897878 Opened 2 years ago Updated 2 years ago

WR SVG filters: Implement stroke and paint filter inputs

Categories

(Core :: Graphics: WebRender, task)

task

Tracking

()

People

(Reporter: ahale, Unassigned)

References

Details

There are two FilterInstance constants we're not currently handling in the SVGFE code path, which provide a simple fill color to the filter as an input - which should be relatively easy to achieve by creating a single pixel node with feFlood to initialize it.

The function that needs editing is WrSVGFEInputBuild in FilterInstance.cpp, but it also means inserting additional feFlood nodes, so it's not entirely trivial.

Note from longsonr:
These are pretty simple, it's basically a flood filter in the stroke or fill colour. They are SVG only i.e. you can't have a CSS fillPaint or strokePaint. There's a test here: https://www.w3.org/Graphics/SVG/Test/20110816/svg/filters-overview-01-b.svg although the tests are incorrectly labelled (the fillpaint tests stroke paint and the stroke paint tests fill paint but they look the same).

Is that true? I thought they can be more complex than a solid color. You can set fill and stroke to a pattern or a gradient, and then these inputs would need to be a whole surface, or maybe a blob.

Summary: WR SVG filters: Implement stroke and paint filter input colors → WR SVG filters: Implement stroke and paint filter inputs

If they can be a whole image in their own right then yeah, though the implementation on the Gecko side would be easy either way.

You need to log in before you can comment on or make changes to this bug.