Evas textblock: Now that we cache fi, we don't need shaped_text anymore.
authortasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 15:33:35 +0000 (15:33 +0000)
committertasn <tasn@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 2 May 2011 15:33:35 +0000 (15:33 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@59131 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/engines/common/evas_font_draw.c
src/lib/engines/common/evas_text_utils.c
src/lib/engines/common/evas_text_utils.h

index d099ace..85a8300 100644 (file)
@@ -414,19 +414,7 @@ evas_common_font_draw_internal(RGBA_Image *dst, RGBA_Draw_Context *dc, RGBA_Font
                                const Evas_Text_Props *text_props, RGBA_Gfx_Func func, int ext_x, int ext_y, int ext_w, 
                                int ext_h, RGBA_Font_Int *fi, int im_w, int im_h __UNUSED__)
 {
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   const Eina_Unicode *text = (text_props->info) ?
-      text_props->info->shaped_text + text_props->text_offset :
-      in_text;
-#else
    const Eina_Unicode *text = in_text;
-   /* Not relevant in the Harfbuzz case, and will soon will not be relevant
-    * at all */
-   (void) text;
-   /* Should be marked as unused? or should I do something fancy about it to
-    * make sure the given fi is relevant? */
-   (void) fn;
-#endif
    DATA32 *im;
    FT_Face pface = NULL;
    EVAS_FONT_WALK_TEXT_INIT();
@@ -790,6 +778,7 @@ evas_font_word_prerender(RGBA_Draw_Context *dc, const Eina_Unicode *in_text, con
 {
    struct cinfo *metrics;
    const Eina_Unicode *text = in_text;
+   (void) text;
    unsigned char *im;
    int width;
    int height, above, below, baseline, descent;
index 154332f..7a90b97 100644 (file)
@@ -61,10 +61,6 @@ evas_common_text_props_content_unref(Evas_Text_Props *props)
         if (props->info->ot)
           free(props->info->ot);
 #endif
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-        if (props->info->shaped_text)
-           free(props->info->shaped_text);
-#endif
         free(props->info);
         props->info = NULL;
      }
@@ -295,9 +291,9 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
    Evas_Coord pen_x = 0;
    int adv_d, i;
 #if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   text = text_props->info->shaped_text = eina_unicode_strndup(text, len);
-   evas_bidi_shape_string(text_props->info->shaped_text, par_props, par_pos,
-                          len);
+   Eina_Unicode *base_str;
+   text = base_str = eina_unicode_strndup(text, len);
+   evas_bidi_shape_string(base_str, par_props, par_pos, len);
 #else
    (void) par_props;
    (void) par_pos;
@@ -392,6 +388,9 @@ evas_common_text_props_content_create(void *_fn, const Eina_Unicode *text,
         prev_index = index;
      }
    text_props->len = len;
+# if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
+   free(base_str);
+# endif
 #endif
    text_props->text_len = len;
    text_props->info->refcount = 1;
index 1285d5f..46902a6 100644 (file)
@@ -31,9 +31,6 @@ struct _Evas_Text_Props_Info
    unsigned int refcount;
    Evas_Font_Glyph_Info *glyph;
    Evas_Font_OT_Info *ot;
-#if !defined(OT_SUPPORT) && defined(BIDI_SUPPORT)
-   Eina_Unicode *shaped_text;
-#endif
 };
 
 /* Sorted in visual order when created */