[cairo-commit] 2 commits - src/cairo-scaled-font.c src/cairo-scaled-font-private.h

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Sep 13 16:27:51 UTC 2022


 src/cairo-scaled-font-private.h |    2 +-
 src/cairo-scaled-font.c         |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 2cfd08664d080ff22e357a5feeca9bc29ec1823c
Merge: a7d31a871 531ec8d02
Author: Uli Schlachter <psychon at znc.in>
Date:   Tue Sep 13 16:27:48 2022 +0000

    Merge branch 'scaled-font-make-mutex-recursive' into 'master'
    
    Make cairo_scaled_font_t::mutex recursive
    
    See merge request cairo/cairo!356

commit 531ec8d02db7d3482c3fb65d33dbb50c71b86999
Author: Luca Bacci <luca.bacci982 at gmail.com>
Date:   Mon Sep 5 19:41:19 2022 +0200

    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

diff --git a/src/cairo-scaled-font-private.h b/src/cairo-scaled-font-private.h
index 6fd772bdb..bcc13bdc8 100644
--- a/src/cairo-scaled-font-private.h
+++ b/src/cairo-scaled-font-private.h
@@ -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;
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 5fe81110f..19a7c0876 100755
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -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);
 


More information about the cairo-commit mailing list