Make cairo_scaled_font_t mutex recursive

Since it can now happen to acquire it recursively,
see https://gitlab.freedesktop.org/cairo/cairo/-/issues/587
This commit is contained in:
Luca Bacci 2022-09-05 19:41:19 +02:00
parent 0e27a8046e
commit 531ec8d02d
2 changed files with 2 additions and 2 deletions

View file

@ -107,7 +107,7 @@ struct _cairo_scaled_font {
cairo_font_extents_t fs_extents; /* font space */
/* The mutex protects modification to all subsequent fields. */
cairo_mutex_t mutex;
cairo_recursive_mutex_t mutex;
cairo_hash_table_t *glyphs;
cairo_list_t glyph_pages;

View file

@ -788,7 +788,7 @@ _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
cairo_font_face_reference (font_face);
scaled_font->original_font_face = NULL;
CAIRO_MUTEX_INIT (scaled_font->mutex);
CAIRO_RECURSIVE_MUTEX_INIT (scaled_font->mutex);
cairo_list_init (&scaled_font->dev_privates);