summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-07-13 12:33:48 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-07-13 12:35:51 +0100
commitcd4b2d843b2a8c06ba78c15ff65763b5bdf54dc6 (patch)
treeab0cd576e1e8c8ddecc6bbe3e90b5f3dfbffae1a
parent84c66589bc6f6a9f924863e578a49e4f2492ec87 (diff)
scaled-font: Key the cache on the orignal font_face
We check the incoming scaled font using the original font fce, so we need to also store it in the cache using the same face, and not the resolved font_face (which will remain the same unless the fontconfig configuration is updated). Hides the quadratic behaviour of font retrieval in recent cairo-traces. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--src/cairo-scaled-font.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 1a95cdaf..1b3cd5eb 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -963,7 +963,7 @@ cairo_scaled_font_create (cairo_font_face_t *font_face,
}
}
- _cairo_scaled_font_init_key (&key, font_face,
+ _cairo_scaled_font_init_key (&key, original_font_face,
font_matrix, ctm, options);
}
else
@@ -979,7 +979,7 @@ cairo_scaled_font_create (cairo_font_face_t *font_face,
}
}
- _cairo_scaled_font_init_key (&key, font_face,
+ _cairo_scaled_font_init_key (&key, original_font_face,
font_matrix, ctm, options);
while ((scaled_font = _cairo_hash_table_lookup (font_map->hash_table,