svg: Reject raster sources

This hopefully fixes the raster-source test case crashing:

cairo-svg-surface.c:2269: _cairo_svg_surface_emit_pattern: Assertion `!"reached"' failed.

I cannot / did not test this change locally and rely on CI to tell me
whether this works.

Signed-off-by: Uli Schlachter <psychon@znc.in>
This commit is contained in:
Uli Schlachter 2021-04-18 09:32:44 +02:00
parent 9ea171b132
commit 0c9dacbc43

View file

@ -1138,7 +1138,7 @@ _cairo_svg_surface_analyze_operation (cairo_svg_surface_t *surface,
return CAIRO_INT_STATUS_UNSUPPORTED;
}
if (pattern->type == CAIRO_PATTERN_TYPE_MESH)
if (pattern->type == CAIRO_PATTERN_TYPE_MESH || pattern->type == CAIRO_PATTERN_TYPE_RASTER_SOURCE)
return CAIRO_INT_STATUS_UNSUPPORTED;
/* SVG doesn't support extend reflect for image pattern */