summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-03-17 19:10:22 +0900
committerCedric BAIL <cedric.bail@samsung.com>2014-03-17 19:17:23 +0900
commit5da08f61c943d17d893f5da1b624355caa34893d (patch)
tree154c41bdcadb6a2d15e6b4278ea1bb7875dbe0da
parent66259d09e354396e54a0cc385f09a784678a3a20 (diff)
edje: check font change in edje text part cache infra.
@fix
-rw-r--r--src/lib/edje/edje_private.h3
-rw-r--r--src/lib/edje/edje_text.c4
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 0ca1ca7c04..66a53568fe 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1537,9 +1537,10 @@ struct _Edje_Real_Part_Text
1537 Evas_Coord in_w, in_h; // 8 1537 Evas_Coord in_w, in_h; // 8
1538 const char *in_str; // 4 1538 const char *in_str; // 4
1539 const char *out_str; // 4 1539 const char *out_str; // 4
1540 const char *in_font; // 4
1540 FLOAT_T align_x, align_y; // 16 1541 FLOAT_T align_x, align_y; // 16
1541 } cache; 1542 } cache;
1542}; // 76 1543}; // 88
1543// FIXME make text a potiner to struct and alloc at end 1544// FIXME make text a potiner to struct and alloc at end
1544// if part type is TEXT move common members textblock + 1545// if part type is TEXT move common members textblock +
1545// text to front and have smaller struct for textblock 1546// 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 3f68519987..9f5536d931 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,
256 (ep->typedata.text->cache.align_y == params->type.text.align.y) && 256 (ep->typedata.text->cache.align_y == params->type.text.align.y) &&
257 (ep->typedata.text->cache.elipsis == params->type.text.elipsis) && 257 (ep->typedata.text->cache.elipsis == params->type.text.elipsis) &&
258 (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) && 258 (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
259 (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y)) 259 (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
260 (ep->typedata.text->cache.in_font == font))
260 { 261 {
261 text = ep->typedata.text->cache.out_str; 262 text = ep->typedata.text->cache.out_str;
262 size = ep->typedata.text->cache.out_size; 263 size = ep->typedata.text->cache.out_size;
@@ -404,6 +405,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
404 eina_stringshare_replace(&ep->typedata.text->cache.out_str, text); 405 eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
405 ep->typedata.text->cache.in_w = sw; 406 ep->typedata.text->cache.in_w = sw;
406 ep->typedata.text->cache.in_h = sh; 407 ep->typedata.text->cache.in_h = sh;
408 ep->typedata.text->cache.in_font = font;
407 ep->typedata.text->cache.out_size = size; 409 ep->typedata.text->cache.out_size = size;
408 ep->typedata.text->cache.align_x = params->type.text.align.x; 410 ep->typedata.text->cache.align_x = params->type.text.align.x;
409 ep->typedata.text->cache.align_y = params->type.text.align.y; 411 ep->typedata.text->cache.align_y = params->type.text.align.y;