diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-28 17:44:15 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-02-28 17:44:15 +0000 |
commit | ef7e57f0fd1aaf96be87cc73b4d51d6ce55f231b (patch) | |
tree | 130a6c93f2964e3c7ebb89b847eaa05dd80c63b9 /src/cairo-scaled-font.c | |
parent | 050c246174e480a3e27b1665e70f1958d02d9008 (diff) | |
download | cairo-ef7e57f0fd1aaf96be87cc73b4d51d6ce55f231b.tar.gz |
scaled-font: Assign a temporary hash value for the placeholder
Fixes [large-]twin-antialias-mixed.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-scaled-font.c')
-rw-r--r-- | src/cairo-scaled-font.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c index 934b29759..062e89536 100644 --- a/src/cairo-scaled-font.c +++ b/src/cairo-scaled-font.c @@ -61,6 +61,9 @@ * size and transformation and a certain set of font options. */ +static uint32_t +_cairo_scaled_font_compute_hash (cairo_scaled_font_t *scaled_font); + /* Global Glyph Cache * * We maintain a global pool of glyphs split between all active fonts. This @@ -506,6 +509,8 @@ _cairo_scaled_font_register_placeholder_and_unlock_font_map (cairo_scaled_font_t placeholder_scaled_font->placeholder = TRUE; + placeholder_scaled_font->hash_entry.hash + = _cairo_scaled_font_compute_hash (placeholder_scaled_font); status = _cairo_hash_table_insert (cairo_scaled_font_map->hash_table, &placeholder_scaled_font->hash_entry); if (unlikely (status)) @@ -531,6 +536,9 @@ _cairo_scaled_font_unregister_placeholder_and_lock_font_map (cairo_scaled_font_t CAIRO_MUTEX_LOCK (_cairo_scaled_font_map_mutex); + /* temporary hash value to match the placeholder */ + scaled_font->hash_entry.hash + = _cairo_scaled_font_compute_hash (scaled_font); placeholder_scaled_font = _cairo_hash_table_lookup (cairo_scaled_font_map->hash_table, &scaled_font->hash_entry); |