WR SVG filters: Implement stroke and paint filter inputs
Categories
(Core :: Graphics: WebRender, 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.
| Reporter | ||
Comment 1•2 years ago
|
||
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).
Comment 2•2 years ago
|
||
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.
| Reporter | ||
Updated•2 years ago
|
| Reporter | ||
Comment 3•2 years ago
|
||
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.
Description
•