mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 06:28:01 +02:00
font: Actually perform destruction of fonts
Commit 337ab1f8d9 introduced delayed
font destruction to overcome a race, but prevented the correct cleanup
of the font cache.
This caused fonts to stay in the cache and caused a crash in the
api-special-cases (when running the test suite with -f).
Fixes api-special-cases,
https://bugs.freedesktop.org/show_bug.cgi?id=87567
This commit is contained in:
parent
028d286e61
commit
02e4efc961
1 changed files with 3 additions and 2 deletions
|
|
@ -128,7 +128,8 @@ cairo_font_face_reference (cairo_font_face_t *font_face)
|
|||
}
|
||||
slim_hidden_def (cairo_font_face_reference);
|
||||
|
||||
static inline int __put(cairo_reference_count_t *v)
|
||||
static inline cairo_bool_t
|
||||
__put(cairo_reference_count_t *v)
|
||||
{
|
||||
int c, old;
|
||||
|
||||
|
|
@ -136,7 +137,7 @@ static inline int __put(cairo_reference_count_t *v)
|
|||
while (c != 1 && (old = _cairo_atomic_int_cmpxchg_return_old(&v->ref_count, c, c - 1)) != c)
|
||||
c = old;
|
||||
|
||||
return c;
|
||||
return c != 1;
|
||||
}
|
||||
|
||||
cairo_bool_t
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue