mirror of
https://github.com/storytold/harfbuzz.git
synced 2026-11-23 16:01:07 +01:00
Use push_or_fail in raster SVG paths
This commit is contained in:
1 parent
2329724c1e
commit
a940e06ff4
3 files changed
+3
-6
No files matched your search
@@ -83,8 +83,7 @@ svg_clip_append_shape (hb_svg_clip_collect_context_t *ctx,
|
||||
clip_shape.has_transform = true;
|
||||
clip_shape.transform = transform;
|
||||
}
|
||||
ctx->defs->clip_shapes.push (clip_shape);
|
||||
if (likely (!ctx->defs->clip_shapes.in_error ()))
|
||||
if (likely (ctx->defs->clip_shapes.push_or_fail (clip_shape)))
|
||||
ctx->clip->shape_count++;
|
||||
else if (ctx->had_alloc_failure)
|
||||
*ctx->had_alloc_failure = true;
|
||||
|
||||
@@ -147,8 +147,7 @@ hb_raster_svg_emit_fill (const hb_svg_fill_context_t *ctx,
|
||||
if (unlikely (!node.visit ((uintptr_t) cur)))
|
||||
break;
|
||||
|
||||
chain.push (cur);
|
||||
if (unlikely (chain.in_error ()))
|
||||
if (unlikely (!chain.push_or_fail (cur)))
|
||||
{
|
||||
if (fallback_paint.len)
|
||||
hb_raster_svg_emit_fill (ctx, fallback_paint, fill_opacity, object_bbox, current_color);
|
||||
|
||||
@@ -90,8 +90,7 @@ svg_parse_gradient_stop (hb_svg_xml_parser_t &parser,
|
||||
stop.offset = offset;
|
||||
stop.color = color;
|
||||
stop.is_current_color = is_current_color;
|
||||
grad.stops.push (stop);
|
||||
return !grad.stops.in_error ();
|
||||
return grad.stops.push_or_fail (stop);
|
||||
}
|
||||
|
||||
static void
|
||||
|
||||
Reference in new issue
Block a user