[cairo-bugs] [Bug 50705] cairo_glyph_path is not multithread safe

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Tue Jun 5 00:05:32 PDT 2012


https://bugs.freedesktop.org/show_bug.cgi?id=50705

--- Comment #1 from Chris Wilson <chris at chris-wilson.co.uk> 2012-06-05 00:05:32 PDT ---
Silly question, can you please test:

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 59440b2..2f4dbfe 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -2861,8 +2861,10 @@ _cairo_scaled_font_free_last_glyph (cairo_scaled_font_t
*scaled_font,
     _cairo_scaled_glyph_fini (scaled_font, scaled_glyph);

     if (--page->num_glyphs == 0) {
+    CAIRO_MUTEX_LOCK (_cairo_scaled_glyph_page_cache_mutex);
     _cairo_cache_remove (&cairo_scaled_glyph_page_cache,
                      &page->cache_entry);
+    CAIRO_MUTEX_UNLOCK (_cairo_scaled_glyph_page_cache_mutex);
     }
 }

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA Contact for the bug.


More information about the cairo-bugs mailing list