From f0f9f7b7a6dd631e0499c757147f7565d33a07ac Mon Sep 17 00:00:00 2001 From: Ulisses Furquim Date: Fri, 11 Jan 2013 19:56:49 +0000 Subject: [PATCH] evas/text: remove misleading comments on glyphs array refs SVN revision: 82665 --- src/lib/evas/common/evas_font_draw.c | 8 +------- src/lib/evas/common/evas_text_utils.c | 6 +----- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/src/lib/evas/common/evas_font_draw.c b/src/lib/evas/common/evas_font_draw.c index 84e8062d94..8436038224 100644 --- a/src/lib/evas/common/evas_font_draw.c +++ b/src/lib/evas/common/evas_font_draw.c @@ -299,13 +299,7 @@ evas_common_font_draw_prepare(Evas_Text_Props *text_props) if (!reused_glyphs) { - /* - * Clearing the reference to the glyph array is fine, since this - * reference is only used to use this from another thread, which is now - * holding the reference. - */ - if (text_props->glyphs) - evas_common_font_glyphs_unref(text_props->glyphs); + if (text_props->glyphs) evas_common_font_glyphs_unref(text_props->glyphs); text_props->glyphs = malloc(sizeof(*text_props->glyphs)); if (!text_props->glyphs) goto error; diff --git a/src/lib/evas/common/evas_text_utils.c b/src/lib/evas/common/evas_text_utils.c index f1fd0b3276..e6e015e1f0 100644 --- a/src/lib/evas/common/evas_text_utils.c +++ b/src/lib/evas/common/evas_text_utils.c @@ -68,10 +68,8 @@ evas_common_text_props_content_nofree_unref(Evas_Text_Props *props) } evas_common_font_glyphs_unref(props->glyphs); - /* After unreferencing the glyph array, a thread will still hold - * a reference, so this can be safely set to NULL. */ props->glyphs = NULL; - + if (props->info->glyph) free(props->info->glyph); #ifdef OT_SUPPORT @@ -91,8 +89,6 @@ evas_common_text_props_content_unref(Evas_Text_Props *props) return; if (props->glyphs) evas_common_font_glyphs_unref(props->glyphs); - /* After unreferencing the glyph array, a thread will still hold - * a reference, so this can be safely set to NULL. */ props->glyphs = NULL; if (--(props->info->refcount) == 0)