summaryrefslogtreecommitdiff
path: root/src/cairo-toy-font-face.c
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2011-06-17 16:29:00 +0200
committerAndrea Canciani <ranma42@gmail.com>2011-06-20 10:24:20 +0200
commitcbf11fa26109a6c725c7d7a356d4acc16a7be0e2 (patch)
tree35ffa9eb7f1836616034c4c7868dcd383a0d6aac /src/cairo-toy-font-face.c
parent5a79e9f536771234f5460ef35e8ed63dc5ecf82a (diff)
downloadcairo-cbf11fa26109a6c725c7d7a356d4acc16a7be0e2.tar.gz
toy-font: Do not open-code cairo_font_face_reference ()
Since 03be41151d06d48d55bc1e172535829ec45a10cf, it is safe to use cairo_font_face_reference () to increment the reference count of a font taken from the hashtable, because no mutex is being locked twice.
Diffstat (limited to 'src/cairo-toy-font-face.c')
-rw-r--r--src/cairo-toy-font-face.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/cairo-toy-font-face.c b/src/cairo-toy-font-face.c
index b82d8b06a..e82d535fc 100644
--- a/src/cairo-toy-font-face.c
+++ b/src/cairo-toy-font-face.c
@@ -302,9 +302,7 @@ cairo_toy_font_face_create (const char *family,
&key.base.hash_entry);
if (font_face != NULL) {
if (font_face->base.status == CAIRO_STATUS_SUCCESS) {
- /* We increment the reference count here manually to avoid
- double-locking. */
- _cairo_reference_count_inc (&font_face->base.ref_count);
+ cairo_font_face_reference (&font_face->base);
_cairo_toy_font_face_hash_table_unlock ();
return &font_face->base;
}