Filter-related refactoring and color-interpolation-filters support
- Replaced stuff in
filters::iterators
withsurface_utils
which includesSharedImageSurface
, a wrapper providing safe shared access (hopefully this time). As far as I can tell with this wrapper you can't modify the image surface while it's being accessed read-only from potentially multiple places at once. (Unless youset_as_source_surface()
and then somehow extract the image surface fromget_source()
, which I'm not sure is possible, but if it isset_as_source_surface()
needs to be marked asunsafe
with a note saying you shouldn't do that). - Added support for
color-interpolation-filters
property. - Refactored {un,}linearization to happen pretty much transparently to filter primitives removing some boilerplate and room for error.
- The previous point applied to the remaining C filters revealed a bug in bounds computation which was fixed.
- Turns out feComposite does indeed need to linearize the second surface, and composite-04 and 05 are giving different results due to
<image>
and feImage loading the bird image with darker colors than other SVG viewers. It's a little strange because opening the bird image in GIMP seems to give the same darker colors as I get with librsvg which suggests that<image>
is loading it correctly, but the SVG test reference image and Chromium + Firefox display that bird image in lighter colors. The other test images seem to be unaffected by this.