[cairo-commit] 2 commits - src/cairo-scaled-font.c src/cairo-user-font.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Sat May 24 19:18:29 PDT 2008
src/cairo-scaled-font.c | 2 +-
src/cairo-user-font.c | 7 +++++++
2 files changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 8ff0fa112da0d13da2596c4ca6815f5b441c9c7d
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat May 24 22:11:41 2008 -0400
Fix typos
diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 5cafbfe..197cce6 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -498,7 +498,7 @@ _cairo_scaled_font_init (cairo_scaled_font_t *scaled_font,
* producing an error.
*
* FIXME: If the scale is rank 1, we still go into error mode. But then
- * again, that's what we doo everywhere in cairo.
+ * again, that's what we do everywhere in cairo.
*
* Also, the check for == 0. below may bee too harsh...
*/
diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c
index d6d4ffb..e1928df 100644
--- a/src/cairo-user-font.c
+++ b/src/cairo-user-font.c
@@ -332,7 +332,7 @@ _cairo_user_font_face_scaled_font_create (void *abstract_
*
* To fix that, we should make _cairo_scaled_font_init() insert
* scaled_font in the fontmap, then lock the scaled_font lock here and
- * release the fontmaps.
+ * release the fontmap's.
*/
CAIRO_MUTEX_UNLOCK (_cairo_scaled_font_map_mutex);
status = font_face->scaled_font_methods.init (&user_scaled_font->base,
commit a3d9918428daf96811b050c1e27b6330bbccd35e
Author: Behdad Esfahbod <behdad at behdad.org>
Date: Sat May 24 20:51:43 2008 -0400
[user-font] Note possible locking issue
diff --git a/src/cairo-user-font.c b/src/cairo-user-font.c
index 886250a..d6d4ffb 100644
--- a/src/cairo-user-font.c
+++ b/src/cairo-user-font.c
@@ -327,6 +327,13 @@ _cairo_user_font_face_scaled_font_create (void *abstract_
}
if (font_face->scaled_font_methods.init != NULL) {
+ /* XXX by releasing fontmap lock here, we open up the case for having
+ * two scaled fonts with the same key to be inserted in the fontmap.
+ *
+ * To fix that, we should make _cairo_scaled_font_init() insert
+ * scaled_font in the fontmap, then lock the scaled_font lock here and
+ * release the fontmaps.
+ */
CAIRO_MUTEX_UNLOCK (_cairo_scaled_font_map_mutex);
status = font_face->scaled_font_methods.init (&user_scaled_font->base,
&font_extents);
More information about the cairo-commit
mailing list