From 10b935443536f9c3258b384f688adc63fdfa2a5f Mon Sep 17 00:00:00 2001 From: tasn Date: Mon, 14 Feb 2011 09:37:49 +0000 Subject: [PATCH] Evas textblock: Used eina_list_append_relative_list instead of eina_list_append_relative in some places, which obviously made things way faster. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@57008 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/canvas/evas_object_textblock.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/lib/canvas/evas_object_textblock.c b/src/lib/canvas/evas_object_textblock.c index 1a67832..a04b7e5 100644 --- a/src/lib/canvas/evas_object_textblock.c +++ b/src/lib/canvas/evas_object_textblock.c @@ -1782,7 +1782,7 @@ struct _Ctxt Eina_Bool align_auto; }; -static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, const Evas_Object_Textblock_Item *rel); +static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, Eina_List *rel); static void _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti); /** * @internal @@ -2429,13 +2429,14 @@ _layout_text_cutoff_get(Ctxt *c, Evas_Object_Textblock_Format *fmt, * Cut the text up until cut and split * * @param c the context to work on - Not NULL. - * @param it the item to cut - not null. + * @param ti the item to cut - not null. + * @param lti the logical list item of the item. * @param cut the cut index. * @return the second (newly created) item. */ static Evas_Object_Textblock_Text_Item * _layout_item_text_split_strip_white(Ctxt *c, - Evas_Object_Textblock_Text_Item *ti, int cut) + Evas_Object_Textblock_Text_Item *ti, Eina_List *lti, int cut) { Eina_Unicode *ts; Evas_Object_Textblock_Text_Item *new_ti = NULL, *white_ti = NULL; @@ -2457,7 +2458,7 @@ _layout_item_text_split_strip_white(Ctxt *c, evas_common_text_props_split(&ti->parent.text_props, &new_ti->parent.text_props, cut2); - _layout_text_add_logical_item(c, new_ti, _ITEM(ti)); + _layout_text_add_logical_item(c, new_ti, lti); } if (cut2 > cut) @@ -2471,7 +2472,7 @@ _layout_item_text_split_strip_white(Ctxt *c, evas_common_text_props_split(&ti->parent.text_props, &white_ti->parent.text_props, cut); - _layout_text_add_logical_item(c, white_ti, _ITEM(ti)); + _layout_text_add_logical_item(c, white_ti, lti); } if (new_ti || white_ti) @@ -2655,11 +2656,11 @@ _text_item_update_sizes(Ctxt *c, Evas_Object_Textblock_Text_Item *ti) */ static void _layout_text_add_logical_item(Ctxt *c, Evas_Object_Textblock_Text_Item *ti, - const Evas_Object_Textblock_Item *rel) + Eina_List *rel) { _text_item_update_sizes(c, ti); - c->par->logical_items = eina_list_append_relative( + c->par->logical_items = eina_list_append_relative_list( c->par->logical_items, ti, rel); } @@ -3254,7 +3255,7 @@ _layout_visualize_par(Ctxt *c) last_ti); if ((wrap > 0) && last_ti->text[wrap]) { - _layout_item_text_split_strip_white(c, last_ti, + _layout_item_text_split_strip_white(c, last_ti, i, wrap); } else if (wrap == 0) @@ -3336,7 +3337,7 @@ _layout_visualize_par(Ctxt *c) if (wrap > 0) { - _layout_item_text_split_strip_white(c, ti, wrap); + _layout_item_text_split_strip_white(c, ti, i, wrap); } else if (wrap == 0) { -- 2.7.4