skia2/modules/svg
Tyler Denniston 0a145b77f7 [svg] Compute and use filter primitive subregion
Spec: https://www.w3.org/TR/SVG11/filters.html#FilterPrimitiveSubRegion

The filter primitive subregion restricts the output of a specific <fe*>
node in a filter DAG. By default it's equal to the union of subregions
of all input filters, or the filter region if no inputs exist. If
x/y/w/h are specified on the <fe*> node, those are used to bound the
primitive subregion instead.

In this CL:
- Implement the computation of the primitive subregion in
  SkSVGFe::resolveFilterSubregion
- Add primitiveUnits to filter context
- Change result registration (by string ID) in filter context to include
  the primitive subregion of that result. This is needed because filters
  referencing previous results need access to those primitive subregions
  to compute the union.

Bug: skia:10841
Change-Id: I66fbb4979e3c65cb5e5cc61f98286ec7ad023438
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/344666
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2021-01-11 17:42:57 +00:00
..
include [svg] Compute and use filter primitive subregion 2021-01-11 17:42:57 +00:00
src [svg] Compute and use filter primitive subregion 2021-01-11 17:42:57 +00:00
tests Reland "[svg] Absolute positioning support for text" 2020-12-18 02:09:18 +00:00
utils [svg] Allow clients to pass a custom SkFontMgr 2020-11-11 01:51:44 +00:00
BUILD.gn Reland "[svg] Absolute positioning support for text" 2020-12-18 02:09:18 +00:00
svg.gni Reland "[svg] Absolute positioning support for text" 2020-12-18 02:09:18 +00:00