mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-23 19:50:21 +01:00
[svg] Lock the scaled_font whilst emitting glyphs.
We need to hold the scaled_font mutex whilst looking upon glyphs so lock the font whilst iterating over the font subset.
This commit is contained in:
parent
4587e9e4f5
commit
644e78ca4e
1 changed files with 2 additions and 0 deletions
|
|
@ -733,6 +733,7 @@ _cairo_svg_document_emit_font_subset (cairo_scaled_font_subset_t *font_subset,
|
|||
unsigned int i;
|
||||
cairo_status_t status = CAIRO_STATUS_SUCCESS;
|
||||
|
||||
CAIRO_MUTEX_LOCK (font_subset->scaled_font->mutex);
|
||||
for (i = 0; i < font_subset->num_glyphs; i++) {
|
||||
status = _cairo_svg_document_emit_glyph (document,
|
||||
font_subset->scaled_font,
|
||||
|
|
@ -741,6 +742,7 @@ _cairo_svg_document_emit_font_subset (cairo_scaled_font_subset_t *font_subset,
|
|||
if (status)
|
||||
break;
|
||||
}
|
||||
CAIRO_MUTEX_UNLOCK (font_subset->scaled_font->mutex);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue