cedric pushed a commit to branch efl-1.8.

http://git.enlightenment.org/core/efl.git/commit/?id=5da08f61c943d17d893f5da1b624355caa34893d

commit 5da08f61c943d17d893f5da1b624355caa34893d
Author: Cedric BAIL <[email protected]>
Date:   Mon Mar 17 19:10:22 2014 +0900

    edje: check font change in edje text part cache infra.
    
    @fix
---
 src/lib/edje/edje_private.h | 3 ++-
 src/lib/edje/edje_text.c    | 4 +++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 0ca1ca7..66a5356 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1537,9 +1537,10 @@ struct _Edje_Real_Part_Text
       Evas_Coord          in_w, in_h; // 8
       const char         *in_str; // 4
       const char         *out_str; // 4
+      const char         *in_font; // 4
       FLOAT_T             align_x, align_y; // 16
    } cache;
-}; // 76
+}; // 88
 // FIXME make text a potiner to struct and alloc at end
 // if part type is TEXT move common members textblock +
 // text to front and have smaller struct for textblock
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index 3f68519..9f5536d 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -256,7 +256,8 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
        (ep->typedata.text->cache.align_y == params->type.text.align.y) &&
        (ep->typedata.text->cache.elipsis == params->type.text.elipsis) &&
        (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
-       (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y))
+       (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
+       (ep->typedata.text->cache.in_font == font))
      {
         text = ep->typedata.text->cache.out_str;
         size = ep->typedata.text->cache.out_size;
@@ -404,6 +405,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
    eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
    ep->typedata.text->cache.in_w = sw;
    ep->typedata.text->cache.in_h = sh;
+   ep->typedata.text->cache.in_font = font;
    ep->typedata.text->cache.out_size = size;
    ep->typedata.text->cache.align_x = params->type.text.align.x;
    ep->typedata.text->cache.align_y = params->type.text.align.y;

-- 


Reply via email to