diff options
author | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-05-27 13:08:52 -0400 |
---|---|---|
committer | Søren Sandmann Pedersen <ssp@redhat.com> | 2013-05-27 13:08:52 -0400 |
commit | fed91a27b2fa0bc2aa3ab6acacc35ddda2e44188 (patch) | |
tree | aae555c3145d2c66d25221912ad57d447c50b7b8 | |
parent | d6ce114a766af8919f668ff91cfd0e8583765928 (diff) |
Freeze the font cachepixman-surface
-rw-r--r-- | src/cairo-pixman-surface.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cairo-pixman-surface.c b/src/cairo-pixman-surface.c index a5add8f4..729791a8 100644 --- a/src/cairo-pixman-surface.c +++ b/src/cairo-pixman-surface.c @@ -1596,6 +1596,8 @@ cairo_pixman_surface_glyphs (void *abstract_surface, width = pixman_image_get_width (psurface->pimage); height = pixman_image_get_height (psurface->pimage); + _cairo_scaled_font_freeze_cache (scaled_font); + CAIRO_MUTEX_LOCK (_cairo_glyph_cache_mutex); glyph_cache = get_glyph_cache(); @@ -1627,9 +1629,11 @@ cairo_pixman_surface_glyphs (void *abstract_surface, * drop the mutex around it. */ CAIRO_MUTEX_UNLOCK (_cairo_glyph_cache_mutex); + status = _cairo_scaled_glyph_lookup (scaled_font, index, CAIRO_SCALED_GLYPH_INFO_SURFACE, &scaled_glyph); + CAIRO_MUTEX_LOCK (_cairo_glyph_cache_mutex); if (unlikely (status)) @@ -1662,6 +1666,8 @@ out_thaw: out_unlock: CAIRO_MUTEX_UNLOCK (_cairo_glyph_cache_mutex); + _cairo_scaled_font_thaw_cache (scaled_font); + return status; } |