[cairo-commit] 3 commits - src/cairo-scaled-font.c

Behdad Esfahbod behdad at kemper.freedesktop.org
Mon Sep 15 15:56:26 PDT 2008


 src/cairo-scaled-font.c |   14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

New commits:
commit 4619c76d2fc4285f2417e54870041cc07c968ce6
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Sep 15 18:51:50 2008 -0400

    [scaled_font] Improve readability

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 82763b0..73c783e 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -485,21 +485,21 @@ _cairo_scaled_font_unregister_placeholder_and_lock_font_map (cairo_scaled_font_t
 }
 
 static void
-_cairo_scaled_font_placeholder_wait_for_creation_to_finish (cairo_scaled_font_t *scaled_font)
+_cairo_scaled_font_placeholder_wait_for_creation_to_finish (cairo_scaled_font_t *placeholder_scaled_font)
 {
     /* reference the place holder so it doesn't go away */
-    cairo_scaled_font_reference (scaled_font);
+    cairo_scaled_font_reference (placeholder_scaled_font);
 
     /* now unlock the fontmap mutex so creation has a chance to finish */
     CAIRO_MUTEX_UNLOCK (_cairo_scaled_font_map_mutex);
 
     /* wait on placeholder mutex until we are awaken */
-    CAIRO_MUTEX_LOCK (scaled_font->mutex);
+    CAIRO_MUTEX_LOCK (placeholder_scaled_font->mutex);
 
     /* ok, creation done.  just clean up and back out */
-    CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
+    CAIRO_MUTEX_UNLOCK (placeholder_scaled_font->mutex);
     CAIRO_MUTEX_LOCK (_cairo_scaled_font_map_mutex);
-    cairo_scaled_font_destroy (scaled_font);
+    cairo_scaled_font_destroy (placeholder_scaled_font);
 }
 
 /* Fowler / Noll / Vo (FNV) Hash (http://www.isthe.com/chongo/tech/comp/fnv/)
commit e079ec03cb8c2272162db86ec263b893df40460a
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Sep 15 18:51:24 2008 -0400

    [scaled-font] Fix bug unlocking the wrong mutex (#16819)

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 5a10c9e..82763b0 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -477,7 +477,7 @@ _cairo_scaled_font_unregister_placeholder_and_lock_font_map (cairo_scaled_font_t
     _cairo_hash_table_remove (cairo_scaled_font_map->hash_table,
 			      &scaled_font->hash_entry);
 
-    CAIRO_MUTEX_UNLOCK (scaled_font->mutex);
+    CAIRO_MUTEX_UNLOCK (placeholder_scaled_font->mutex);
 
     CAIRO_MUTEX_UNLOCK (_cairo_scaled_font_map_mutex);
     cairo_scaled_font_destroy (placeholder_scaled_font);
commit 096408d80e2ca13deccea7930aeca9fbd1b5850e
Author: Behdad Esfahbod <behdad at behdad.org>
Date:   Mon Sep 15 18:51:04 2008 -0400

    [scaled-font] Improve comment

diff --git a/src/cairo-scaled-font.c b/src/cairo-scaled-font.c
index 385bdf0..5a10c9e 100644
--- a/src/cairo-scaled-font.c
+++ b/src/cairo-scaled-font.c
@@ -407,7 +407,7 @@ _cairo_scaled_font_map_destroy (void)
  *
  * The reason we have to create a fake scaled font instead of just using
  * scaled_font is for lifecycle management: we need to (or rather,
- * other code needs to) reference the scaked_font in the hash.
+ * other code needs to) reference the scaked_font in the hash table.
  * We can't do that on the input scaled_font as it may be freed by
  * font backend upon error.
  */


More information about the cairo-commit mailing list