Commit Graph

3 Commits

Author SHA1 Message Date
Tyler Denniston
62a683e476 [svg] Prep work for filter primitive subregion
- Add primitiveUnits attribute to SkSVGFilter class
- Add optional x, y, width, height attributes to filter effect base
  class (SkSVGFe)
- Add function to return list of inputs for all filter effects
- Add function to compute filter primitive subregion and use it in all
  filter effect classes.

Currently the "primitive subregion" just returns the entire filter
effect region, so there should be no diffs on gold with this change.

Bug: skia:10841
Change-Id: I1de283bebe302c0710d6b09d62a2472787820a49
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343107
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-12-11 18:21:21 +00:00
Tyler Denniston
b2d1a3bdd7 [svg] Minor cleanups
- Consolidate SVGColor resolution into one method in render context, now
  that it's a shared type.
- Remove all instances of `~TypeName() override = default;`. The only
  thing this provides is slight/unreliable protection against someone
  inadvertently removing 'virtual' from the base class destructor. In
  our case that is SkRefCnt, which I'm assuming has very low risk of
  that happening.
- Clean up some .h copy/paste issues of the form
  `#endif  // Typename_DEFINED`

Change-Id: I67fb40b2828b010fb7fdd83046bc1eae1a476267
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/343421
Reviewed-by: Florin Malita <fmalita@chromium.org>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
2020-12-11 16:25:20 +00:00
Tyler Denniston
b25caae788 [svg] Implement feComposite, basic filter result storage
- Plumbing to store filter results by id and resolve them as inputs
  when referenced
- Added implementation of feComposite filter
- Added call to resolve input in feColorMatrix
- Bugfix to SkSVGFilterType operator==

The tests filters-color-01-b and filters-composite-03-b should now be
passing.

Bug: skia:10841
Change-Id: I2cd099c60ac21710f25184806c5cc537656b42af
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/332723
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2020-11-10 14:00:56 +00:00