cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=2b84495168b09a7e56620bb346bb492fbd6fee6a

commit 2b84495168b09a7e56620bb346bb492fbd6fee6a
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 3f81442..cc7ddf2 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1544,9 +1544,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;
-}; // 84
+}; // 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 2d3a38d..6f37c55 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -266,7 +266,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;
@@ -414,6 +415,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