mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-18 23:28:08 +02:00
Free color glyphs hash table when SVG surface is destroyed
Signed-off-by: Raman Varabets <gitlab-20240601-da2ef10c@cyborgize.sg>
This commit is contained in:
parent
d53079cfcc
commit
bf652edbf7
1 changed files with 17 additions and 0 deletions
|
|
@ -147,6 +147,18 @@ _cairo_svg_source_surface_pluck (void *entry, void *closure)
|
|||
free (source_surface);
|
||||
}
|
||||
|
||||
static void
|
||||
_cairo_svg_color_glyph_pluck (void *entry, void *closure)
|
||||
{
|
||||
cairo_svg_color_glyph_t *glyph_entry = entry;
|
||||
cairo_hash_table_t *patterns = closure;
|
||||
|
||||
_cairo_hash_table_remove (patterns, &glyph_entry->base);
|
||||
cairo_scaled_font_destroy (glyph_entry->scaled_font);
|
||||
|
||||
free (glyph_entry);
|
||||
}
|
||||
|
||||
static void
|
||||
_cairo_svg_paint_init_key (cairo_svg_paint_t *paint)
|
||||
{
|
||||
|
|
@ -1744,6 +1756,11 @@ _cairo_svg_surface_finish (void *abstract_surface)
|
|||
_cairo_hash_table_foreach (surface->source_surfaces, _cairo_svg_source_surface_pluck, surface->source_surfaces);
|
||||
_cairo_hash_table_destroy (surface->source_surfaces);
|
||||
|
||||
_cairo_hash_table_foreach (surface->color_glyphs,
|
||||
_cairo_svg_color_glyph_pluck,
|
||||
surface->color_glyphs);
|
||||
_cairo_hash_table_destroy (surface->color_glyphs);
|
||||
|
||||
status = _cairo_svg_document_destroy (surface->document);
|
||||
if (final_status == CAIRO_STATUS_SUCCESS) {
|
||||
final_status = status;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue