summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-14 22:30:32 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2016-08-15 09:21:08 +0900
commit1d6a58cfc9f3bbe821eb04150e2b1e0ede7b32eb (patch)
tree6dc7780ff3d013ded3491a87149cd15bc20d12a5
parenta5232bb2839df9594e0bb3d810d3fc2ad24cb463 (diff)
edje - save memory on edje parts as a lot of over-allocation was done
so ... Edje_Calc_Params was huge ... like about 200 bytes. every part in every live edje object got one of these in addtion to real part struct info etc. ... so really every part was probably consuming 300-500 bytes or so... crazy. so i made a lot of the data now optional so only the minimum required is allocated now which cuts down about 110 or even 120 bytes per part, depending. 100 bytes was needed for 3d node parts even though almsot no parts are 3d node parts... the image and text data was 30-40 bytes so we consumed 100 even if we only used 30-40... so this cuts that done and puts in polace calc param cleanup funcs everywhere they are needed to clean up this extra allocated data. i also reduced this even more by maping pointers to req_drag, map and physics and clip_to fields in another extension struct cutting down another 28/52 bytes on most parts (in return for an added 4/8 bytes - on 32/64bit accordingly). in elementary_test this saves about ~300kb of ram for just having the etst run and displaying (peak memory measuremment). so massif says 10.6M -> 10.3M. @optimize
-rw-r--r--src/lib/edje/edje_calc.c761
-rw-r--r--src/lib/edje/edje_embryo.c5
-rw-r--r--src/lib/edje/edje_load.c25
-rw-r--r--src/lib/edje/edje_private.h121
-rw-r--r--src/lib/edje/edje_program.c14
-rw-r--r--src/lib/edje/edje_text.c90
6 files changed, 602 insertions, 414 deletions
diff --git a/src/lib/edje/edje_calc.c b/src/lib/edje/edje_calc.c
index a7bb865481..a9d9204ad3 100644
--- a/src/lib/edje/edje_calc.c
+++ b/src/lib/edje/edje_calc.c
@@ -20,16 +20,18 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea
20 FLOAT_T pos); 20 FLOAT_T pos);
21 21
22#define EINA_COW_CALC_PHYSICS_BEGIN(Calc, Write) \ 22#define EINA_COW_CALC_PHYSICS_BEGIN(Calc, Write) \
23 EINA_COW_WRITE_BEGIN(_edje_calc_params_physics_cow, Calc->physics, Edje_Calc_Params_Physics, Write) 23 _edje_calc_params_need_ext(Calc); \
24 EINA_COW_WRITE_BEGIN(_edje_calc_params_physics_cow, Calc->ext->physics, Edje_Calc_Params_Physics, Write)
24 25
25#define EINA_COW_CALC_PHYSICS_END(Calc, Write) \ 26#define EINA_COW_CALC_PHYSICS_END(Calc, Write) \
26 EINA_COW_WRITE_END(_edje_calc_params_physics_cow, Calc->physics, Write) 27 EINA_COW_WRITE_END(_edje_calc_params_physics_cow, Calc->ext->physics, Write)
27 28
28#define EINA_COW_CALC_MAP_BEGIN(Calc, Write) \ 29#define EINA_COW_CALC_MAP_BEGIN(Calc, Write) \
29 EINA_COW_WRITE_BEGIN(_edje_calc_params_map_cow, Calc->map, Edje_Calc_Params_Map, Write) 30 _edje_calc_params_need_ext(Calc); \
31 EINA_COW_WRITE_BEGIN(_edje_calc_params_map_cow, Calc->ext->map, Edje_Calc_Params_Map, Write)
30 32
31#define EINA_COW_CALC_MAP_END(Calc, Write) \ 33#define EINA_COW_CALC_MAP_END(Calc, Write) \
32 EINA_COW_WRITE_END(_edje_calc_params_map_cow, Calc->map, Write); 34 EINA_COW_WRITE_END(_edje_calc_params_map_cow, Calc->ext->map, Write)
33 35
34#ifdef BUILD_EDJE_FP 36#ifdef BUILD_EDJE_FP
35 37
@@ -92,6 +94,27 @@ static void _edje_part_recalc_single(Edje *ed, Edje_Rea
92 94
93 95
94void 96void
97_edje_calc_params_clear(Edje_Calc_Params *p)
98{
99 // this happens to cover type.common, type.text and type.node
100 if (p->type.common) free(p->type.common);
101 p->type.common = NULL;
102
103 // handle cow stuff in one place
104 if (p->ext)
105 {
106 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&(p->ext->map));
107 p->ext->map = NULL;
108#ifdef HAVE_EPHYSICS
109 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&(p->ext->physics));
110 p->ext->physics = NULL;
111#endif
112 free(p->ext);
113 p->ext = NULL;
114 }
115}
116
117void
95_edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4) 118_edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4)
96{ 119{
97 FLOAT_T fp_pos; 120 FLOAT_T fp_pos;
@@ -745,10 +768,6 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
745 ep->param2 = eina_mempool_malloc(_edje_real_part_state_mp, 768 ep->param2 = eina_mempool_malloc(_edje_real_part_state_mp,
746 sizeof(Edje_Real_Part_State)); 769 sizeof(Edje_Real_Part_State));
747 memset(ep->param2, 0, sizeof(Edje_Real_Part_State)); 770 memset(ep->param2, 0, sizeof(Edje_Real_Part_State));
748 ep->param2->p.map = eina_cow_alloc(_edje_calc_params_map_cow);
749#ifdef HAVE_EPHYSICS
750 ep->param2->p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
751#endif
752 } 771 }
753 else if (ep->part->type == EDJE_PART_TYPE_EXTERNAL) 772 else if (ep->part->type == EDJE_PART_TYPE_EXTERNAL)
754 { 773 {
@@ -772,9 +791,8 @@ _edje_part_description_apply(Edje *ed, Edje_Real_Part *ep, const char *d1, doubl
772 if (ep->param2) 791 if (ep->param2)
773 { 792 {
774 free(ep->param2->set); 793 free(ep->param2->set);
775 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&ep->param2->p.map); 794#ifdef EDJE_CALC_CACHE
776#ifdef HAVE_EPHYSICS 795 _edje_calc_params_clear(&(ep->param2->p));
777 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&ep->param2->p.physics);
778#endif 796#endif
779 } 797 }
780 eina_mempool_free(_edje_real_part_state_mp, ep->param2); 798 eina_mempool_free(_edje_real_part_state_mp, ep->param2);
@@ -1686,7 +1704,9 @@ _edje_part_recalc_single_text(FLOAT_T sc EINA_UNUSED,
1686 1704
1687 _edje_text_class_font_get(ed, desc, &size, &sfont); 1705 _edje_text_class_font_get(ed, desc, &size, &sfont);
1688 free(sfont); 1706 free(sfont);
1689 params->type.text.size = size; /* XXX TODO used by further calcs, go inside recalc_apply? */ 1707
1708 _edje_calc_params_need_type_text(params);
1709 params->type.text->size = size; /* XXX TODO used by further calcs, go inside recalc_apply? */
1690 1710
1691 _edje_text_recalc_apply(ed, ep, params, chosen_desc, EINA_TRUE); 1711 _edje_text_recalc_apply(ed, ep, params, chosen_desc, EINA_TRUE);
1692 1712
@@ -2048,6 +2068,7 @@ _edje_part_recalc_single_drag_threshold(Edje_Real_Part *ep,
2048 Edje_Real_Part *threshold, 2068 Edje_Real_Part *threshold,
2049 Edje_Calc_Params *params) 2069 Edje_Calc_Params *params)
2050{ 2070{
2071 _edje_calc_params_need_ext(params);
2051 if (threshold) 2072 if (threshold)
2052 { 2073 {
2053 if (ep->drag->threshold_started_x && 2074 if (ep->drag->threshold_started_x &&
@@ -2055,14 +2076,14 @@ _edje_part_recalc_single_drag_threshold(Edje_Real_Part *ep,
2055 TO_INT(params->eval.x) + TO_INT(params->eval.w) < threshold->x + threshold->w) 2076 TO_INT(params->eval.x) + TO_INT(params->eval.w) < threshold->x + threshold->w)
2056 { 2077 {
2057 // Cancel movement to previous position due to our presence inside the threshold 2078 // Cancel movement to previous position due to our presence inside the threshold
2058 params->eval.x = FROM_INT(params->req_drag.x); 2079 params->eval.x = FROM_INT(params->ext->req_drag.x);
2059 params->eval.w = FROM_INT(params->req_drag.w); 2080 params->eval.w = FROM_INT(params->ext->req_drag.w);
2060 ep->drag->threshold_x = EINA_TRUE; 2081 ep->drag->threshold_x = EINA_TRUE;
2061 } 2082 }
2062 else 2083 else
2063 { 2084 {
2064 params->req_drag.x = TO_INT(params->eval.x); 2085 params->ext->req_drag.x = TO_INT(params->eval.x);
2065 params->req_drag.w = TO_INT(params->eval.w); 2086 params->ext->req_drag.w = TO_INT(params->eval.w);
2066 ep->drag->threshold_started_x = EINA_FALSE; 2087 ep->drag->threshold_started_x = EINA_FALSE;
2067 } 2088 }
2068 if (ep->drag->threshold_started_y && 2089 if (ep->drag->threshold_started_y &&
@@ -2070,23 +2091,23 @@ _edje_part_recalc_single_drag_threshold(Edje_Real_Part *ep,
2070 TO_INT(params->eval.y) + TO_INT(params->eval.h) < threshold->y + threshold->h) 2091 TO_INT(params->eval.y) + TO_INT(params->eval.h) < threshold->y + threshold->h)
2071 { 2092 {
2072 // Cancel movement to previous position due to our presence inside the threshold 2093 // Cancel movement to previous position due to our presence inside the threshold
2073 params->eval.y = FROM_INT(params->req_drag.y); 2094 params->eval.y = FROM_INT(params->ext->req_drag.y);
2074 params->eval.h = FROM_INT(params->req_drag.h); 2095 params->eval.h = FROM_INT(params->ext->req_drag.h);
2075 ep->drag->threshold_y = EINA_TRUE; 2096 ep->drag->threshold_y = EINA_TRUE;
2076 } 2097 }
2077 else 2098 else
2078 { 2099 {
2079 params->req_drag.y = TO_INT(params->eval.y); 2100 params->ext->req_drag.y = TO_INT(params->eval.y);
2080 params->req_drag.h = TO_INT(params->eval.h); 2101 params->ext->req_drag.h = TO_INT(params->eval.h);
2081 ep->drag->threshold_started_y = EINA_FALSE; 2102 ep->drag->threshold_started_y = EINA_FALSE;
2082 } 2103 }
2083 } 2104 }
2084 else 2105 else
2085 { 2106 {
2086 params->req_drag.x = TO_INT(params->eval.x); 2107 params->ext->req_drag.x = TO_INT(params->eval.x);
2087 params->req_drag.w = TO_INT(params->eval.w); 2108 params->ext->req_drag.w = TO_INT(params->eval.w);
2088 params->req_drag.y = TO_INT(params->eval.y); 2109 params->ext->req_drag.y = TO_INT(params->eval.y);
2089 params->req_drag.h = TO_INT(params->eval.h); 2110 params->ext->req_drag.h = TO_INT(params->eval.h);
2090 } 2111 }
2091} 2112}
2092 2113
@@ -2195,9 +2216,10 @@ _edje_part_recalc_single_fill(Edje_Real_Part *ep,
2195 else 2216 else
2196 fw = params->final.w; 2217 fw = params->final.w;
2197 2218
2198 params->type.common.fill.x = fill->pos_abs_x 2219 _edje_calc_params_need_type_common(params);
2220 params->type.common->fill.x = fill->pos_abs_x
2199 + TO_INT(SCALE(fill->pos_rel_x, fw)); 2221 + TO_INT(SCALE(fill->pos_rel_x, fw));
2200 params->type.common.fill.w = fill->abs_x 2222 params->type.common->fill.w = fill->abs_x
2201 + TO_INT(SCALE(fill->rel_x, fw)); 2223 + TO_INT(SCALE(fill->rel_x, fw));
2202 2224
2203 if (fill->type == EDJE_FILL_TYPE_TILE) 2225 if (fill->type == EDJE_FILL_TYPE_TILE)
@@ -2205,9 +2227,9 @@ _edje_part_recalc_single_fill(Edje_Real_Part *ep,
2205 else 2227 else
2206 fh = params->final.h; 2228 fh = params->final.h;
2207 2229
2208 params->type.common.fill.y = fill->pos_abs_y 2230 params->type.common->fill.y = fill->pos_abs_y
2209 + TO_INT(SCALE(fill->pos_rel_y, fh)); 2231 + TO_INT(SCALE(fill->pos_rel_y, fh));
2210 params->type.common.fill.h = fill->abs_y 2232 params->type.common->fill.h = fill->abs_y
2211 + TO_INT(SCALE(fill->rel_y, fh)); 2233 + TO_INT(SCALE(fill->rel_y, fh));
2212} 2234}
2213 2235
@@ -2800,7 +2822,11 @@ _edje_part_recalc_single(Edje *ed,
2800 params->visible = desc->visible; 2822 params->visible = desc->visible;
2801 2823
2802 /* clip override */ 2824 /* clip override */
2803 params->clip_to = clip_to; 2825 if (clip_to)
2826 {
2827 _edje_calc_params_need_ext(params);
2828 params->ext->clip_to = clip_to;
2829 }
2804 2830
2805 /* set parameters, some are required for recalc_single_text[block] */ 2831 /* set parameters, some are required for recalc_single_text[block] */
2806 switch (ep->part->type) 2832 switch (ep->part->type)
@@ -2813,23 +2839,24 @@ _edje_part_recalc_single(Edje *ed,
2813 _edje_real_part_image_set(ed, ep, &set, pos); 2839 _edje_real_part_image_set(ed, ep, &set, pos);
2814 2840
2815 /* border */ 2841 /* border */
2816 params->type.common.spec.image.l = img_desc->image.border.l; 2842 _edje_calc_params_need_type_common(params);
2817 params->type.common.spec.image.r = img_desc->image.border.r; 2843 params->type.common->spec.image.l = img_desc->image.border.l;
2844 params->type.common->spec.image.r = img_desc->image.border.r;
2818 2845
2819 params->type.common.spec.image.t = img_desc->image.border.t; 2846 params->type.common->spec.image.t = img_desc->image.border.t;
2820 params->type.common.spec.image.b = img_desc->image.border.b; 2847 params->type.common->spec.image.b = img_desc->image.border.b;
2821 2848
2822 params->type.common.spec.image.border_scale_by = img_desc->image.border.scale_by; 2849 params->type.common->spec.image.border_scale_by = img_desc->image.border.scale_by;
2823 2850
2824 if (set && set->set) 2851 if (set && set->set)
2825 { 2852 {
2826#define SET_BORDER_DEFINED(Result, Value) Result = Value ? Value : Result; 2853#define SET_BORDER_DEFINED(Result, Value) Result = Value ? Value : Result;
2827 SET_BORDER_DEFINED(params->type.common.spec.image.l, set->entry->border.l); 2854 SET_BORDER_DEFINED(params->type.common->spec.image.l, set->entry->border.l);
2828 SET_BORDER_DEFINED(params->type.common.spec.image.r, set->entry->border.r); 2855 SET_BORDER_DEFINED(params->type.common->spec.image.r, set->entry->border.r);
2829 SET_BORDER_DEFINED(params->type.common.spec.image.t, set->entry->border.t); 2856 SET_BORDER_DEFINED(params->type.common->spec.image.t, set->entry->border.t);
2830 SET_BORDER_DEFINED(params->type.common.spec.image.b, set->entry->border.b); 2857 SET_BORDER_DEFINED(params->type.common->spec.image.b, set->entry->border.b);
2831 2858
2832 SET_BORDER_DEFINED(params->type.common.spec.image.border_scale_by, set->entry->border.scale_by); 2859 SET_BORDER_DEFINED(params->type.common->spec.image.border_scale_by, set->entry->border.scale_by);
2833 } 2860 }
2834 2861
2835 break; 2862 break;
@@ -2840,33 +2867,34 @@ _edje_part_recalc_single(Edje *ed,
2840 { 2867 {
2841 Edje_Part_Description_Text *text_desc = (Edje_Part_Description_Text *)desc; 2868 Edje_Part_Description_Text *text_desc = (Edje_Part_Description_Text *)desc;
2842 2869
2870 _edje_calc_params_need_type_text(params);
2843 /* text.align */ 2871 /* text.align */
2844 params->type.text.align.x = text_desc->text.align.x; 2872 params->type.text->align.x = text_desc->text.align.x;
2845 params->type.text.align.y = text_desc->text.align.y; 2873 params->type.text->align.y = text_desc->text.align.y;
2846 params->type.text.ellipsis = text_desc->text.ellipsis; 2874 params->type.text->ellipsis = text_desc->text.ellipsis;
2847 2875
2848 /* text colors */ 2876 /* text colors */
2849 if (cc) 2877 if (cc)
2850 { 2878 {
2851 params->type.text.color2.r = (((int)cc->r2 + 1) * text_desc->common.color2.r) >> 8; 2879 params->type.text->color2.r = (((int)cc->r2 + 1) * text_desc->common.color2.r) >> 8;
2852 params->type.text.color2.g = (((int)cc->g2 + 1) * text_desc->common.color2.g) >> 8; 2880 params->type.text->color2.g = (((int)cc->g2 + 1) * text_desc->common.color2.g) >> 8;
2853 params->type.text.color2.b = (((int)cc->b2 + 1) * text_desc->common.color2.b) >> 8; 2881 params->type.text->color2.b = (((int)cc->b2 + 1) * text_desc->common.color2.b) >> 8;
2854 params->type.text.color2.a = (((int)cc->a2 + 1) * text_desc->common.color2.a) >> 8; 2882 params->type.text->color2.a = (((int)cc->a2 + 1) * text_desc->common.color2.a) >> 8;
2855 params->type.text.color3.r = (((int)cc->r3 + 1) * text_desc->text.color3.r) >> 8; 2883 params->type.text->color3.r = (((int)cc->r3 + 1) * text_desc->text.color3.r) >> 8;
2856 params->type.text.color3.g = (((int)cc->g3 + 1) * text_desc->text.color3.g) >> 8; 2884 params->type.text->color3.g = (((int)cc->g3 + 1) * text_desc->text.color3.g) >> 8;
2857 params->type.text.color3.b = (((int)cc->b3 + 1) * text_desc->text.color3.b) >> 8; 2885 params->type.text->color3.b = (((int)cc->b3 + 1) * text_desc->text.color3.b) >> 8;
2858 params->type.text.color3.a = (((int)cc->a3 + 1) * text_desc->text.color3.a) >> 8; 2886 params->type.text->color3.a = (((int)cc->a3 + 1) * text_desc->text.color3.a) >> 8;
2859 } 2887 }
2860 else 2888 else
2861 { 2889 {
2862 params->type.text.color2.r = text_desc->common.color2.r; 2890 params->type.text->color2.r = text_desc->common.color2.r;
2863 params->type.text.color2.g = text_desc->common.color2.g; 2891 params->type.text->color2.g = text_desc->common.color2.g;
2864 params->type.text.color2.b = text_desc->common.color2.b; 2892 params->type.text->color2.b = text_desc->common.color2.b;
2865 params->type.text.color2.a = text_desc->common.color2.a; 2893 params->type.text->color2.a = text_desc->common.color2.a;
2866 params->type.text.color3.r = text_desc->text.color3.r; 2894 params->type.text->color3.r = text_desc->text.color3.r;
2867 params->type.text.color3.g = text_desc->text.color3.g; 2895 params->type.text->color3.g = text_desc->text.color3.g;
2868 params->type.text.color3.b = text_desc->text.color3.b; 2896 params->type.text->color3.b = text_desc->text.color3.b;
2869 params->type.text.color3.a = text_desc->text.color3.a; 2897 params->type.text->color3.a = text_desc->text.color3.a;
2870 } 2898 }
2871 2899
2872 break; 2900 break;
@@ -2887,10 +2915,11 @@ _edje_part_recalc_single(Edje *ed,
2887 { 2915 {
2888 Edje_Part_Description_Light *light_desc = (Edje_Part_Description_Light *)desc; 2916 Edje_Part_Description_Light *light_desc = (Edje_Part_Description_Light *)desc;
2889 2917
2890 params->type.node.data[0] = light_desc->light.orientation.data[0]; 2918 _edje_calc_params_need_type_node(params);
2891 params->type.node.point.x = light_desc->light.position.point.x; 2919 params->type.node->data[0] = light_desc->light.orientation.data[0];
2892 params->type.node.point.y = light_desc->light.position.point.y; 2920 params->type.node->point.x = light_desc->light.position.point.x;
2893 params->type.node.point.z = light_desc->light.position.point.z; 2921 params->type.node->point.y = light_desc->light.position.point.y;
2922 params->type.node->point.z = light_desc->light.position.point.z;
2894 2923
2895 break; 2924 break;
2896 } 2925 }
@@ -2899,10 +2928,11 @@ _edje_part_recalc_single(Edje *ed,
2899 { 2928 {
2900 Edje_Part_Description_Camera *camera_desc = (Edje_Part_Description_Camera *)desc; 2929 Edje_Part_Description_Camera *camera_desc = (Edje_Part_Description_Camera *)desc;
2901 2930
2902 params->type.node.data[0] = camera_desc->camera.orientation.data[0]; 2931 _edje_calc_params_need_type_node(params);
2903 params->type.node.point.x = camera_desc->camera.position.point.x; 2932 params->type.node->data[0] = camera_desc->camera.orientation.data[0];
2904 params->type.node.point.y = camera_desc->camera.position.point.y; 2933 params->type.node->point.x = camera_desc->camera.position.point.x;
2905 params->type.node.point.z = camera_desc->camera.position.point.z; 2934 params->type.node->point.y = camera_desc->camera.position.point.y;
2935 params->type.node->point.z = camera_desc->camera.position.point.z;
2906 2936
2907 break; 2937 break;
2908 } 2938 }
@@ -2911,14 +2941,15 @@ _edje_part_recalc_single(Edje *ed,
2911 { 2941 {
2912 Edje_Part_Description_Mesh_Node *mesh_desc = (Edje_Part_Description_Mesh_Node *)desc; 2942 Edje_Part_Description_Mesh_Node *mesh_desc = (Edje_Part_Description_Mesh_Node *)desc;
2913 2943
2914 params->type.node.frame = mesh_desc->mesh_node.mesh.frame; 2944 _edje_calc_params_need_type_node(params);
2915 params->type.node.data[0] = mesh_desc->mesh_node.orientation.data[0]; 2945 params->type.node->frame = mesh_desc->mesh_node.mesh.frame;
2916 params->type.node.point.x = mesh_desc->mesh_node.position.point.x; 2946 params->type.node->data[0] = mesh_desc->mesh_node.orientation.data[0];
2917 params->type.node.point.y = mesh_desc->mesh_node.position.point.y; 2947 params->type.node->point.x = mesh_desc->mesh_node.position.point.x;
2918 params->type.node.point.z = mesh_desc->mesh_node.position.point.z; 2948 params->type.node->point.y = mesh_desc->mesh_node.position.point.y;
2919 params->type.node.scale_3d.x = mesh_desc->mesh_node.scale_3d.x; 2949 params->type.node->point.z = mesh_desc->mesh_node.position.point.z;
2920 params->type.node.scale_3d.y = mesh_desc->mesh_node.scale_3d.y; 2950 params->type.node->scale_3d.x = mesh_desc->mesh_node.scale_3d.x;
2921 params->type.node.scale_3d.z = mesh_desc->mesh_node.scale_3d.z; 2951 params->type.node->scale_3d.y = mesh_desc->mesh_node.scale_3d.y;
2952 params->type.node->scale_3d.z = mesh_desc->mesh_node.scale_3d.z;
2922 2953
2923 break; 2954 break;
2924 } 2955 }
@@ -3147,7 +3178,7 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
3147 else 3178 else
3148 part_id = chosen_desc->proxy.id; 3179 part_id = chosen_desc->proxy.id;
3149 3180
3150 if ((p3->type.common.fill.w == 0) || (p3->type.common.fill.h == 0) || 3181 if ((p3->type.common->fill.w == 0) || (p3->type.common->fill.h == 0) ||
3151 (part_id < 0)) 3182 (part_id < 0))
3152 { 3183 {
3153 evas_object_image_source_set(ep->object, NULL); 3184 evas_object_image_source_set(ep->object, NULL);
@@ -3195,7 +3226,7 @@ _edje_proxy_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
3195 } 3226 }
3196 } 3227 }
3197 3228
3198 efl_gfx_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y, p3->type.common.fill.w, p3->type.common.fill.h); 3229 efl_gfx_fill_set(ep->object, p3->type.common->fill.x, p3->type.common->fill.y, p3->type.common->fill.w, p3->type.common->fill.h);
3199 efl_image_smooth_scale_set(ep->object, p3->smooth); 3230 efl_image_smooth_scale_set(ep->object, p3->smooth);
3200 evas_object_image_source_visible_set(ep->object, chosen_desc->proxy.source_visible); 3231 evas_object_image_source_visible_set(ep->object, chosen_desc->proxy.source_visible);
3201 evas_object_image_source_clip_set(ep->object, chosen_desc->proxy.source_clip); 3232 evas_object_image_source_clip_set(ep->object, chosen_desc->proxy.source_clip);
@@ -3213,32 +3244,33 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
3213 _edje_real_part_image_set(ed, ep, &set, pos); 3244 _edje_real_part_image_set(ed, ep, &set, pos);
3214 3245
3215 /* border */ 3246 /* border */
3216 p3->type.common.spec.image.l = chosen_desc->image.border.l; 3247 _edje_calc_params_need_type_common(p3);
3217 p3->type.common.spec.image.r = chosen_desc->image.border.r; 3248 p3->type.common->spec.image.l = chosen_desc->image.border.l;
3249 p3->type.common->spec.image.r = chosen_desc->image.border.r;
3218 3250
3219 p3->type.common.spec.image.t = chosen_desc->image.border.t; 3251 p3->type.common->spec.image.t = chosen_desc->image.border.t;
3220 p3->type.common.spec.image.b = chosen_desc->image.border.b; 3252 p3->type.common->spec.image.b = chosen_desc->image.border.b;
3221 3253
3222 p3->type.common.spec.image.border_scale_by = chosen_desc->image.border.scale_by; 3254 p3->type.common->spec.image.border_scale_by = chosen_desc->image.border.scale_by;
3223 3255
3224 if (set && set->set) 3256 if (set && set->set)
3225 { 3257 {
3226#define SET_BORDER_DEFINED(Result, Value) Result = Value ? Value : Result; 3258#define SET_BORDER_DEFINED(Result, Value) Result = Value ? Value : Result;
3227 SET_BORDER_DEFINED(p3->type.common.spec.image.l, set->entry->border.l); 3259 SET_BORDER_DEFINED(p3->type.common->spec.image.l, set->entry->border.l);
3228 SET_BORDER_DEFINED(p3->type.common.spec.image.r, set->entry->border.r); 3260 SET_BORDER_DEFINED(p3->type.common->spec.image.r, set->entry->border.r);
3229 SET_BORDER_DEFINED(p3->type.common.spec.image.t, set->entry->border.t); 3261 SET_BORDER_DEFINED(p3->type.common->spec.image.t, set->entry->border.t);
3230 SET_BORDER_DEFINED(p3->type.common.spec.image.b, set->entry->border.b); 3262 SET_BORDER_DEFINED(p3->type.common->spec.image.b, set->entry->border.b);
3231 3263
3232 SET_BORDER_DEFINED(p3->type.common.spec.image.border_scale_by, set->entry->border.scale_by); 3264 SET_BORDER_DEFINED(p3->type.common->spec.image.border_scale_by, set->entry->border.scale_by);
3233 } 3265 }
3234 3266
3235 efl_gfx_fill_set(ep->object, p3->type.common.fill.x, p3->type.common.fill.y, p3->type.common.fill.w, p3->type.common.fill.h); 3267 efl_gfx_fill_set(ep->object, p3->type.common->fill.x, p3->type.common->fill.y, p3->type.common->fill.w, p3->type.common->fill.h);
3236 efl_image_smooth_scale_set(ep->object, p3->smooth); 3268 efl_image_smooth_scale_set(ep->object, p3->smooth);
3237 if (chosen_desc->image.border.scale) 3269 if (chosen_desc->image.border.scale)
3238 { 3270 {
3239 if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0)) 3271 if (p3->type.common->spec.image.border_scale_by > FROM_DOUBLE(0.0))
3240 { 3272 {
3241 FLOAT_T sc2 = MUL(sc, p3->type.common.spec.image.border_scale_by); 3273 FLOAT_T sc2 = MUL(sc, p3->type.common->spec.image.border_scale_by);
3242 evas_object_image_border_scale_set(ep->object, TO_DOUBLE(sc2)); 3274 evas_object_image_border_scale_set(ep->object, TO_DOUBLE(sc2));
3243 } 3275 }
3244 else 3276 else
@@ -3246,14 +3278,14 @@ _edje_image_recalc_apply(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *p3, Edj
3246 } 3278 }
3247 else 3279 else
3248 { 3280 {
3249 if (p3->type.common.spec.image.border_scale_by > FROM_DOUBLE(0.0)) 3281 if (p3->type.common->spec.image.border_scale_by > FROM_DOUBLE(0.0))
3250 evas_object_image_border_scale_set 3282 evas_object_image_border_scale_set
3251 (ep->object, TO_DOUBLE(p3->type.common.spec.image.border_scale_by)); 3283 (ep->object, TO_DOUBLE(p3->type.common->spec.image.border_scale_by));
3252 else 3284 else
3253 evas_object_image_border_scale_set(ep->object, 1.0); 3285 evas_object_image_border_scale_set(ep->object, 1.0);
3254 } 3286 }
3255 evas_object_image_border_set(ep->object, p3->type.common.spec.image.l, p3->type.common.spec.image.r, 3287 evas_object_image_border_set(ep->object, p3->type.common->spec.image.l, p3->type.common->spec.image.r,
3256 p3->type.common.spec.image.t, p3->type.common.spec.image.b); 3288 p3->type.common->spec.image.t, p3->type.common->spec.image.b);
3257 if (chosen_desc->image.border.no_fill == 0) 3289 if (chosen_desc->image.border.no_fill == 0)
3258 evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_DEFAULT); 3290 evas_object_image_border_center_fill_set(ep->object, EVAS_BORDER_FILL_DEFAULT);
3259 else if (chosen_desc->image.border.no_fill == 1) 3291 else if (chosen_desc->image.border.no_fill == 1)
@@ -3364,16 +3396,17 @@ _edje_physics_body_props_update(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *
3364 Eina_Bool pos_update) 3396 Eina_Bool pos_update)
3365{ 3397{
3366 if (!EPH_LOAD()) return; 3398 if (!EPH_LOAD()) return;
3399 _edje_calc_params_need_ext(pf);
3367 EPH_CALL(ephysics_body_linear_movement_enable_set) 3400 EPH_CALL(ephysics_body_linear_movement_enable_set)
3368 (ep->body, 3401 (ep->body,
3369 pf->physics->mov_freedom.lin.x, 3402 pf->ext->physics->mov_freedom.lin.x,
3370 pf->physics->mov_freedom.lin.y, 3403 pf->ext->physics->mov_freedom.lin.y,
3371 pf->physics->mov_freedom.lin.z); 3404 pf->ext->physics->mov_freedom.lin.z);
3372 EPH_CALL(ephysics_body_angular_movement_enable_set) 3405 EPH_CALL(ephysics_body_angular_movement_enable_set)
3373 (ep->body, 3406 (ep->body,
3374 pf->physics->mov_freedom.ang.x, 3407 pf->ext->physics->mov_freedom.ang.x,
3375 pf->physics->mov_freedom.ang.y, 3408 pf->ext->physics->mov_freedom.ang.y,
3376 pf->physics->mov_freedom.ang.z); 3409 pf->ext->physics->mov_freedom.ang.z);
3377 3410
3378 /* Boundaries geometry and mass shouldn't be changed */ 3411 /* Boundaries geometry and mass shouldn't be changed */
3379 if (ep->part->physics_body < EDJE_PART_PHYSICS_BODY_BOUNDARY_TOP) 3412 if (ep->part->physics_body < EDJE_PART_PHYSICS_BODY_BOUNDARY_TOP)
@@ -3386,7 +3419,7 @@ _edje_physics_body_props_update(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *
3386 (ep->body, 3419 (ep->body,
3387 ed->x + pf->final.x, 3420 ed->x + pf->final.x,
3388 ed->y + pf->final.y, 3421 ed->y + pf->final.y,
3389 pf->physics->z); 3422 pf->ext->physics->z);
3390 ep->x = pf->final.x; 3423 ep->x = pf->final.x;
3391 ep->y = pf->final.y; 3424 ep->y = pf->final.y;
3392 ep->w = pf->final.w; 3425 ep->w = pf->final.w;
@@ -3394,18 +3427,18 @@ _edje_physics_body_props_update(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *
3394 } 3427 }
3395 3428
3396 EPH_CALL(ephysics_body_geometry_get)(ep->body, &x, &y, &z, &w, &h, &d); 3429 EPH_CALL(ephysics_body_geometry_get)(ep->body, &x, &y, &z, &w, &h, &d);
3397 if ((d) && (d != pf->physics->depth)) 3430 if ((d) && (d != pf->ext->physics->depth))
3398 EPH_CALL(ephysics_body_resize)(ep->body, w, h, pf->physics->depth); 3431 EPH_CALL(ephysics_body_resize)(ep->body, w, h, pf->ext->physics->depth);
3399 if (z != pf->physics->z) 3432 if (z != pf->ext->physics->z)
3400 EPH_CALL(ephysics_body_move)(ep->body, x, y, pf->physics->z); 3433 EPH_CALL(ephysics_body_move)(ep->body, x, y, pf->ext->physics->z);
3401 3434
3402 EPH_CALL(ephysics_body_material_set)(ep->body, pf->physics->material); 3435 EPH_CALL(ephysics_body_material_set)(ep->body, pf->ext->physics->material);
3403 if (!pf->physics->material) 3436 if (!pf->ext->physics->material)
3404 { 3437 {
3405 if (pf->physics->density) 3438 if (pf->ext->physics->density)
3406 EPH_CALL(ephysics_body_density_set)(ep->body, pf->physics->density); 3439 EPH_CALL(ephysics_body_density_set)(ep->body, pf->ext->physics->density);
3407 else 3440 else
3408 EPH_CALL(ephysics_body_mass_set)(ep->body, pf->physics->mass); 3441 EPH_CALL(ephysics_body_mass_set)(ep->body, pf->ext->physics->mass);
3409 } 3442 }
3410 3443
3411 if ((ep->part->physics_body == EDJE_PART_PHYSICS_BODY_SOFT_BOX) || 3444 if ((ep->part->physics_body == EDJE_PART_PHYSICS_BODY_SOFT_BOX) ||
@@ -3413,21 +3446,21 @@ _edje_physics_body_props_update(Edje *ed, Edje_Real_Part *ep, Edje_Calc_Params *
3413 (ep->part->physics_body == EDJE_PART_PHYSICS_BODY_SOFT_CYLINDER) || 3446 (ep->part->physics_body == EDJE_PART_PHYSICS_BODY_SOFT_CYLINDER) ||
3414 (ep->part->physics_body == EDJE_PART_PHYSICS_BODY_CLOTH)) 3447 (ep->part->physics_body == EDJE_PART_PHYSICS_BODY_CLOTH))
3415 EPH_CALL(ephysics_body_soft_body_hardness_set) 3448 EPH_CALL(ephysics_body_soft_body_hardness_set)
3416 (ep->body, pf->physics->hardness * 100); 3449 (ep->body, pf->ext->physics->hardness * 100);
3417 } 3450 }
3418 3451
3419 if (!pf->physics->material) 3452 if (!pf->ext->physics->material)
3420 { 3453 {
3421 EPH_CALL(ephysics_body_restitution_set)(ep->body, pf->physics->restitution); 3454 EPH_CALL(ephysics_body_restitution_set)(ep->body, pf->ext->physics->restitution);
3422 EPH_CALL(ephysics_body_friction_set)(ep->body, pf->physics->friction); 3455 EPH_CALL(ephysics_body_friction_set)(ep->body, pf->ext->physics->friction);
3423 } 3456 }
3424 3457
3425 EPH_CALL(ephysics_body_damping_set)(ep->body, pf->physics->damping.linear, 3458 EPH_CALL(ephysics_body_damping_set)(ep->body, pf->ext->physics->damping.linear,
3426 pf->physics->damping.angular); 3459 pf->ext->physics->damping.angular);
3427 EPH_CALL(ephysics_body_sleeping_threshold_set)(ep->body, pf->physics->sleep.linear, 3460 EPH_CALL(ephysics_body_sleeping_threshold_set)(ep->body, pf->ext->physics->sleep.linear,
3428 pf->physics->sleep.angular); 3461 pf->ext->physics->sleep.angular);
3429 EPH_CALL(ephysics_body_light_set)(ep->body, pf->physics->light_on); 3462 EPH_CALL(ephysics_body_light_set)(ep->body, pf->ext->physics->light_on);
3430 EPH_CALL(ephysics_body_back_face_culling_set)(ep->body, pf->physics->backcull); 3463 EPH_CALL(ephysics_body_back_face_culling_set)(ep->body, pf->ext->physics->backcull);
3431} 3464}
3432 3465
3433static void 3466static void
@@ -3559,12 +3592,14 @@ _edje_physics_body_add(Edje *ed, Edje_Real_Part *rp, EPhysics_World *world)
3559static void 3592static void
3560_map_colors_free(Edje_Calc_Params *pf) 3593_map_colors_free(Edje_Calc_Params *pf)
3561{ 3594{
3562 Edje_Map_Color **colors = pf->map->colors; 3595 if (pf->ext)
3563 int i; 3596 {
3597 Edje_Map_Color **colors = pf->ext->map->colors;
3598 int i;
3564 3599
3565 for (i = 0; i < (int)pf->map->colors_count; i++) 3600 for (i = 0; i < (int)pf->ext->map->colors_count; i++) free(colors[i]);
3566 free(colors[i]); 3601 free(colors);
3567 free(colors); 3602 }
3568} 3603}
3569 3604
3570static Eina_Bool 3605static Eina_Bool
@@ -3577,9 +3612,12 @@ _map_colors_interp(Edje_Calc_Params *p1, Edje_Calc_Params *p2,
3577 unsigned char col1_r = 255, col1_g = 255, col1_b = 255, col1_a = 255; 3612 unsigned char col1_r = 255, col1_g = 255, col1_b = 255, col1_a = 255;
3578 unsigned char col2_r = 255, col2_g = 255, col2_b = 255, col2_a = 255; 3613 unsigned char col2_r = 255, col2_g = 255, col2_b = 255, col2_a = 255;
3579 3614
3580 if ((p1->map->colors_count > 0) || (p2->map->colors_count > 0)) 3615 _edje_calc_params_need_ext(p1);
3616 _edje_calc_params_need_ext(p2);
3617
3618 if ((p1->ext->map->colors_count > 0) || (p2->ext->map->colors_count > 0))
3581 { 3619 {
3582 pmap->colors_count = (p1->map->colors_count > p2->map->colors_count ? p1->map->colors_count : p2->map->colors_count); 3620 pmap->colors_count = (p1->ext->map->colors_count > p2->ext->map->colors_count ? p1->ext->map->colors_count : p2->ext->map->colors_count);
3583 3621
3584 pmap->colors = (Edje_Map_Color **)malloc(sizeof(Edje_Map_Color *) * (int)pmap->colors_count); 3622 pmap->colors = (Edje_Map_Color **)malloc(sizeof(Edje_Map_Color *) * (int)pmap->colors_count);
3585 3623
@@ -3591,9 +3629,9 @@ _map_colors_interp(Edje_Calc_Params *p1, Edje_Calc_Params *p2,
3591 col3->idx = i; /* we don't care about index position anyway */ 3629 col3->idx = i; /* we don't care about index position anyway */
3592 3630
3593 /* find color with idx from first */ 3631 /* find color with idx from first */
3594 for (j = 0; j < (int)p1->map->colors_count; j++) 3632 for (j = 0; j < (int)p1->ext->map->colors_count; j++)
3595 { 3633 {
3596 col = p1->map->colors[j]; 3634 col = p1->ext->map->colors[j];
3597 if (col3->idx == col->idx) 3635 if (col3->idx == col->idx)
3598 { 3636 {
3599 col1_r = col->r; 3637 col1_r = col->r;
@@ -3604,9 +3642,9 @@ _map_colors_interp(Edje_Calc_Params *p1, Edje_Calc_Params *p2,
3604 } 3642 }
3605 } 3643 }
3606 /* find color from idx from second */ 3644 /* find color from idx from second */
3607 for (j = 0; j < (int)p2->map->colors_count; j++) 3645 for (j = 0; j < (int)p2->ext->map->colors_count; j++)
3608 { 3646 {
3609 col2 = p2->map->colors[j]; 3647 col2 = p2->ext->map->colors[j];
3610 if (col3->idx == col2->idx) 3648 if (col3->idx == col2->idx)
3611 { 3649 {
3612 col2_r = col2->r; 3650 col2_r = col2->r;
@@ -3638,11 +3676,13 @@ _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf,
3638 Edje_Part_Description_Common *chosen_desc, 3676 Edje_Part_Description_Common *chosen_desc,
3639 Edje_Real_Part *ep, Evas_Object *mo) 3677 Edje_Real_Part *ep, Evas_Object *mo)
3640{ 3678{
3641 Edje_Map_Color **colors = pf->map->colors; 3679 Edje_Map_Color *color, **colors;
3642 int colors_cnt = pf->map->colors_count; 3680 int colors_cnt, i;
3643 int i;
3644 3681
3645 Edje_Map_Color *color; 3682 if (!pf->ext) return;
3683
3684 colors = pf->ext->map->colors;
3685 colors_cnt = pf->ext->map->colors_count;
3646 3686
3647 evas_map_util_points_populate_from_object(map, ep->object); 3687 evas_map_util_points_populate_from_object(map, ep->object);
3648 3688
@@ -3681,33 +3721,33 @@ _edje_map_prop_set(Evas_Map *map, const Edje_Calc_Params *pf,
3681 3721
3682 //zoom 3722 //zoom
3683 evas_map_util_zoom(map, 3723 evas_map_util_zoom(map,
3684 pf->map->zoom.x, pf->map->zoom.y, 3724 pf->ext->map->zoom.x, pf->ext->map->zoom.y,
3685 pf->map->center.x, pf->map->center.y); 3725 pf->ext->map->center.x, pf->ext->map->center.y);
3686 3726
3687 //rotate 3727 //rotate
3688 evas_map_util_3d_rotate(map, 3728 evas_map_util_3d_rotate(map,
3689 TO_DOUBLE(pf->map->rotation.x), 3729 TO_DOUBLE(pf->ext->map->rotation.x),
3690 TO_DOUBLE(pf->map->rotation.y), 3730 TO_DOUBLE(pf->ext->map->rotation.y),
3691 TO_DOUBLE(pf->map->rotation.z), 3731 TO_DOUBLE(pf->ext->map->rotation.z),
3692 pf->map->center.x, pf->map->center.y, 3732 pf->ext->map->center.x, pf->ext->map->center.y,
3693 pf->map->center.z); 3733 pf->ext->map->center.z);
3694 3734
3695 // calculate light color & position etc. if there is one 3735 // calculate light color & position etc. if there is one
3696 if (pf->lighted) 3736 if (pf->lighted)
3697 { 3737 {
3698 evas_map_util_3d_lighting(map, pf->map->light.x, pf->map->light.y, 3738 evas_map_util_3d_lighting(map, pf->ext->map->light.x, pf->ext->map->light.y,
3699 pf->map->light.z, pf->map->light.r, 3739 pf->ext->map->light.z, pf->ext->map->light.r,
3700 pf->map->light.g, pf->map->light.b, 3740 pf->ext->map->light.g, pf->ext->map->light.b,
3701 pf->map->light.ar, pf->map->light.ag, 3741 pf->ext->map->light.ar, pf->ext->map->light.ag,
3702 pf->map->light.ab); 3742 pf->ext->map->light.ab);
3703 } 3743 }
3704 3744
3705 // calculate perspective point 3745 // calculate perspective point
3706 if (chosen_desc->map.persp_on) 3746 if (chosen_desc->map.persp_on)
3707 { 3747 {
3708 evas_map_util_3d_perspective(map, 3748 evas_map_util_3d_perspective(map,
3709 pf->map->persp.x, pf->map->persp.y, 3749 pf->ext->map->persp.x, pf->ext->map->persp.y,
3710 pf->map->persp.z, pf->map->persp.focal); 3750 pf->ext->map->persp.z, pf->ext->map->persp.focal);
3711 } 3751 }
3712 3752
3713 // handle backface culling (object is facing away from view 3753 // handle backface culling (object is facing away from view
@@ -3836,6 +3876,54 @@ _circular_dependency_find(Edje *ed, Edje_Real_Part *ep, Edje_Real_Part *cep, Ein
3836 return EINA_FALSE; 3876 return EINA_FALSE;
3837} 3877}
3838 3878
3879static void
3880_edje_part_calc_params_memcpy(Edje_Calc_Params *p, Edje_Calc_Params *s, Edje_Part_Type t)
3881{
3882 if (p->type.common) free(p->type.common);
3883 memcpy(p, s, sizeof(Edje_Calc_Params));
3884 switch (t)
3885 {
3886 case EDJE_PART_TYPE_IMAGE:
3887 {
3888 Edje_Calc_Params_Type_Common *d = malloc(sizeof(*d));
3889 if (d)
3890 {
3891 memcpy(d, s->type.common, sizeof(*d));
3892 p->type.common = d;
3893 }
3894 else p->type.common = NULL;
3895 }
3896 break;
3897 case EDJE_PART_TYPE_TEXT:
3898 case EDJE_PART_TYPE_TEXTBLOCK:
3899 {
3900 Edje_Calc_Params_Type_Text *d = malloc(sizeof(*d));
3901 if (d)
3902 {
3903 memcpy(d, s->type.text, sizeof(*d));
3904 p->type.text = d;
3905 }
3906 else p->type.text = NULL;
3907 }
3908 break;
3909 case EDJE_PART_TYPE_LIGHT:
3910 case EDJE_PART_TYPE_CAMERA:
3911 case EDJE_PART_TYPE_MESH_NODE:
3912 {
3913 Edje_Calc_Params_Type_Node *d = malloc(sizeof(*d));
3914 if (d)
3915 {
3916 memcpy(d, s->type.node, sizeof(*d));
3917 p->type.node = d;
3918 }
3919 else p->type.node = NULL;
3920 }
3921 break;
3922 default:
3923 break;
3924 }
3925}
3926
3839void 3927void
3840_edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state) 3928_edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *state)
3841{ 3929{
@@ -3870,6 +3958,18 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
3870 Evas_Coord mmw = 0, mmh = 0; 3958 Evas_Coord mmw = 0, mmh = 0;
3871 Eina_Bool map_colors_free = EINA_FALSE; 3959 Eina_Bool map_colors_free = EINA_FALSE;
3872 3960
3961#ifdef EDJE_CALC_CACHE
3962#else
3963 lp1.type.common = NULL;
3964 lp1.ext = NULL;
3965
3966 lp2.type.common = NULL;
3967 lp2.ext = NULL;
3968#endif
3969
3970 lp3.type.common = NULL;
3971 lp3.ext = NULL;
3972
3873 /* GRADIENT ARE GONE, WE MUST IGNORE IT FROM OLD FILE. */ 3973 /* GRADIENT ARE GONE, WE MUST IGNORE IT FROM OLD FILE. */
3874 if (ep->part->type == EDJE_PART_TYPE_GRADIENT) 3974 if (ep->part->type == EDJE_PART_TYPE_GRADIENT)
3875 { 3975 {
@@ -4171,10 +4271,6 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4171 4271
4172#ifndef EDJE_CALC_CACHE 4272#ifndef EDJE_CALC_CACHE
4173 p1 = &lp1; 4273 p1 = &lp1;
4174 p1.map = eina_cow_alloc(_edje_calc_params_map_cow);
4175#ifdef HAVE_EPHYSICS
4176 p1.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
4177#endif
4178#else 4274#else
4179 p1 = &ep->param1.p; 4275 p1 = &ep->param1.p;
4180#endif 4276#endif
@@ -4217,37 +4313,41 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4217 4313
4218 if (ep->current) 4314 if (ep->current)
4219 { 4315 {
4316 Eina_Bool needext = EINA_FALSE;
4220 const Edje_Calc_Params_Map *map; 4317 const Edje_Calc_Params_Map *map;
4221#ifdef HAVE_EPHYSICS 4318#ifdef HAVE_EPHYSICS
4222 const Edje_Calc_Params_Physics *physics; 4319 const Edje_Calc_Params_Physics *physics;
4223#endif 4320#endif
4224 4321
4225 map = p1->map; 4322 if (p1->ext)
4323 {
4324 needext = EINA_TRUE;
4325 map = p1->ext->map;
4226#ifdef HAVE_EPHYSICS 4326#ifdef HAVE_EPHYSICS
4227 physics = p1->physics; 4327 physics = p1->ext->physics;
4228#endif 4328#endif
4329 }
4229 4330
4230 /* FIXME: except for text, we don't need in that case to recalc p1 at all*/ 4331 _edje_part_calc_params_memcpy(p1, ep->current, ep->part->type);
4231 memcpy(p1, ep->current, sizeof (Edje_Calc_Params));
4232 4332
4233 p1->map = map; 4333 if (needext)
4334 {
4335 p1->ext = NULL;
4336 _edje_calc_params_need_ext(p1);
4337 p1->ext->map = map;
4234#ifdef HAVE_EPHYSICS 4338#ifdef HAVE_EPHYSICS
4235 p1->physics = physics; 4339 p1->ext->physics = physics;
4236#endif 4340#endif
4237 } 4341 eina_cow_memcpy(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&p1->ext->map, ep->current->ext->map);
4238
4239 p3 = &lp3;
4240 lp3.map = eina_cow_alloc(_edje_calc_params_map_cow);
4241#ifdef HAVE_EPHYSICS 4342#ifdef HAVE_EPHYSICS
4242 lp3.physics = eina_cow_alloc(_edje_calc_params_physics_cow); 4343 eina_cow_memcpy(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&p1->ext->physics, ep->current->ext->physics);
4243#endif 4344#endif
4345 }
4346 }
4244 4347
4348 p3 = &lp3;
4245#ifndef EDJE_CALC_CACHE 4349#ifndef EDJE_CALC_CACHE
4246 p2 = &lp2; 4350 p2 = &lp2;
4247 lp2.map = eina_cow_alloc(_edje_calc_params_map_cow);
4248#ifdef HAVE_EPHYSICS
4249 lp2.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
4250#endif
4251#else 4351#else
4252 p2 = &ep->param2->p; 4352 p2 = &ep->param2->p;
4253 4353
@@ -4296,13 +4396,45 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4296 4396
4297 /* clip_to will behave a bit like visible */ 4397 /* clip_to will behave a bit like visible */
4298 if (pos == ZERO) 4398 if (pos == ZERO)
4299 p3->clip_to = p1->clip_to; 4399 {
4400 if ((p1->ext) && (p1->ext->clip_to))
4401 {
4402 _edje_calc_params_need_ext(p3);
4403 p3->ext->clip_to = p1->ext->clip_to;
4404 }
4405 }
4300 else if (pos == FROM_INT(1)) 4406 else if (pos == FROM_INT(1))
4301 p3->clip_to = p2->clip_to; 4407 {
4302 else if (!p1->clip_to) 4408 if ((p2->ext) && (p2->ext->clip_to))
4303 p3->clip_to = p2->clip_to; 4409 {
4410 _edje_calc_params_need_ext(p3);
4411 p3->ext->clip_to = p2->ext->clip_to;
4412 }
4413 }
4414 else if ((!p1->ext) || (!p1->ext->clip_to))
4415 {
4416 if ((p2->ext) && (p2->ext->clip_to))
4417 {
4418 _edje_calc_params_need_ext(p3);
4419 p3->ext->clip_to = p2->ext->clip_to;
4420 }
4421 else
4422 {
4423 if (p3->ext) p3->ext->clip_to = NULL;
4424 }
4425 }
4304 else 4426 else
4305 p3->clip_to = p1->clip_to; 4427 {
4428 if ((p1->ext) && (p1->ext->clip_to))
4429 {
4430 _edje_calc_params_need_ext(p3);
4431 p3->ext->clip_to = p1->ext->clip_to;
4432 }
4433 else
4434 {
4435 if (p3->ext) p3->ext->clip_to = NULL;
4436 }
4437 }
4306 4438
4307 p3->smooth = (beginning_pos) ? p1->smooth : p2->smooth; 4439 p3->smooth = (beginning_pos) ? p1->smooth : p2->smooth;
4308 4440
@@ -4325,13 +4457,15 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4325 4457
4326 if (ep->part->dragable.x) 4458 if (ep->part->dragable.x)
4327 { 4459 {
4328 p3->req_drag.x = INTP(p1->req_drag.x, p2->req_drag.x, pos); 4460 _edje_calc_params_need_ext(p3);
4329 p3->req_drag.w = INTP(p1->req_drag.w, p2->req_drag.w, pos); 4461 p3->ext->req_drag.x = INTP(p1->ext->req_drag.x, p2->ext->req_drag.x, pos);
4462 p3->ext->req_drag.w = INTP(p1->ext->req_drag.w, p2->ext->req_drag.w, pos);
4330 } 4463 }
4331 if (ep->part->dragable.y) 4464 if (ep->part->dragable.y)
4332 { 4465 {
4333 p3->req_drag.y = INTP(p1->req_drag.y, p2->req_drag.y, pos); 4466 _edje_calc_params_need_ext(p3);
4334 p3->req_drag.h = INTP(p1->req_drag.h, p2->req_drag.h, pos); 4467 p3->ext->req_drag.y = INTP(p1->ext->req_drag.y, p2->ext->req_drag.y, pos);
4468 p3->ext->req_drag.h = INTP(p1->ext->req_drag.h, p2->ext->req_drag.h, pos);
4335 } 4469 }
4336 4470
4337 p3->color.r = INTP(p1->color.r, p2->color.r, pos2); 4471 p3->color.r = INTP(p1->color.r, p2->color.r, pos2);
@@ -4342,58 +4476,60 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4342#ifdef HAVE_EPHYSICS 4476#ifdef HAVE_EPHYSICS
4343 if (ep->part->physics_body || ep->body) 4477 if (ep->part->physics_body || ep->body)
4344 { 4478 {
4479 _edje_calc_params_need_ext(p1);
4480 _edje_calc_params_need_ext(p2);
4345 EINA_COW_CALC_PHYSICS_BEGIN(p3, p3_write) 4481 EINA_COW_CALC_PHYSICS_BEGIN(p3, p3_write)
4346 { 4482 {
4347 p3_write->mass = TO_DOUBLE(FINTP(p1->physics->mass, p2->physics->mass, 4483 p3_write->mass = TO_DOUBLE(FINTP(p1->ext->physics->mass, p2->ext->physics->mass,
4348 pos)); 4484 pos));
4349 p3_write->restitution = TO_DOUBLE(FINTP(p1->physics->restitution, 4485 p3_write->restitution = TO_DOUBLE(FINTP(p1->ext->physics->restitution,
4350 p2->physics->restitution, 4486 p2->ext->physics->restitution,
4351 pos)); 4487 pos));
4352 p3_write->friction = TO_DOUBLE(FINTP(p1->physics->friction, 4488 p3_write->friction = TO_DOUBLE(FINTP(p1->ext->physics->friction,
4353 p2->physics->friction, pos)); 4489 p2->ext->physics->friction, pos));
4354 p3_write->density = TO_DOUBLE(FINTP(p1->physics->density, 4490 p3_write->density = TO_DOUBLE(FINTP(p1->ext->physics->density,
4355 p2->physics->density, pos)); 4491 p2->ext->physics->density, pos));
4356 p3_write->hardness = TO_DOUBLE(FINTP(p1->physics->hardness, 4492 p3_write->hardness = TO_DOUBLE(FINTP(p1->ext->physics->hardness,
4357 p2->physics->hardness, pos)); 4493 p2->ext->physics->hardness, pos));
4358 4494
4359 p3_write->damping.linear = TO_DOUBLE(FINTP(p1->physics->damping.linear, 4495 p3_write->damping.linear = TO_DOUBLE(FINTP(p1->ext->physics->damping.linear,
4360 p2->physics->damping.linear, pos)); 4496 p2->ext->physics->damping.linear, pos));
4361 p3_write->damping.angular = TO_DOUBLE(FINTP(p1->physics->damping.angular, 4497 p3_write->damping.angular = TO_DOUBLE(FINTP(p1->ext->physics->damping.angular,
4362 p2->physics->damping.angular, pos)); 4498 p2->ext->physics->damping.angular, pos));
4363 4499
4364 p3_write->sleep.linear = TO_DOUBLE(FINTP(p1->physics->sleep.linear, 4500 p3_write->sleep.linear = TO_DOUBLE(FINTP(p1->ext->physics->sleep.linear,
4365 p2->physics->sleep.linear, pos)); 4501 p2->ext->physics->sleep.linear, pos));
4366 p3_write->sleep.angular = TO_DOUBLE(FINTP(p1->physics->sleep.angular, 4502 p3_write->sleep.angular = TO_DOUBLE(FINTP(p1->ext->physics->sleep.angular,
4367 p2->physics->sleep.angular, pos)); 4503 p2->ext->physics->sleep.angular, pos));
4368 4504
4369 p3_write->z = INTP(p1->physics->z, p2->physics->z, pos); 4505 p3_write->z = INTP(p1->ext->physics->z, p2->ext->physics->z, pos);
4370 p3_write->depth = INTP(p1->physics->depth, p2->physics->depth, pos); 4506 p3_write->depth = INTP(p1->ext->physics->depth, p2->ext->physics->depth, pos);
4371 4507
4372 if ((p1->physics->ignore_part_pos) && (p2->physics->ignore_part_pos)) 4508 if ((p1->ext->physics->ignore_part_pos) && (p2->ext->physics->ignore_part_pos))
4373 p3_write->ignore_part_pos = 1; 4509 p3_write->ignore_part_pos = 1;
4374 else 4510 else
4375 p3_write->ignore_part_pos = 0; 4511 p3_write->ignore_part_pos = 0;
4376 4512
4377 if ((p1->physics->material) && (p2->physics->material)) 4513 if ((p1->ext->physics->material) && (p2->ext->physics->material))
4378 p3_write->material = p1->physics->material; 4514 p3_write->material = p1->ext->physics->material;
4379 else 4515 else
4380 p3_write->material = EPHYSICS_BODY_MATERIAL_CUSTOM; 4516 p3_write->material = EPHYSICS_BODY_MATERIAL_CUSTOM;
4381 4517
4382 p3_write->light_on = p1->physics->light_on || p2->physics->light_on; 4518 p3_write->light_on = p1->ext->physics->light_on || p2->ext->physics->light_on;
4383 p3_write->backcull = p1->physics->backcull || p2->physics->backcull; 4519 p3_write->backcull = p1->ext->physics->backcull || p2->ext->physics->backcull;
4384 4520
4385 p3_write->mov_freedom.lin.x = p1->physics->mov_freedom.lin.x || 4521 p3_write->mov_freedom.lin.x = p1->ext->physics->mov_freedom.lin.x ||
4386 p2->physics->mov_freedom.lin.x; 4522 p2->ext->physics->mov_freedom.lin.x;
4387 p3_write->mov_freedom.lin.y = p1->physics->mov_freedom.lin.y || 4523 p3_write->mov_freedom.lin.y = p1->ext->physics->mov_freedom.lin.y ||
4388 p2->physics->mov_freedom.lin.y; 4524 p2->ext->physics->mov_freedom.lin.y;
4389 p3_write->mov_freedom.lin.z = p1->physics->mov_freedom.lin.z || 4525 p3_write->mov_freedom.lin.z = p1->ext->physics->mov_freedom.lin.z ||
4390 p2->physics->mov_freedom.lin.z; 4526 p2->ext->physics->mov_freedom.lin.z;
4391 p3_write->mov_freedom.ang.x = p1->physics->mov_freedom.ang.x || 4527 p3_write->mov_freedom.ang.x = p1->ext->physics->mov_freedom.ang.x ||
4392 p2->physics->mov_freedom.ang.x; 4528 p2->ext->physics->mov_freedom.ang.x;
4393 p3_write->mov_freedom.ang.y = p1->physics->mov_freedom.ang.y || 4529 p3_write->mov_freedom.ang.y = p1->ext->physics->mov_freedom.ang.y ||
4394 p2->physics->mov_freedom.ang.y; 4530 p2->ext->physics->mov_freedom.ang.y;
4395 p3_write->mov_freedom.ang.z = p1->physics->mov_freedom.ang.z || 4531 p3_write->mov_freedom.ang.z = p1->ext->physics->mov_freedom.ang.z ||
4396 p2->physics->mov_freedom.ang.z; 4532 p2->ext->physics->mov_freedom.ang.z;
4397 } 4533 }
4398 EINA_COW_CALC_PHYSICS_END(p3, p3_write); 4534 EINA_COW_CALC_PHYSICS_END(p3, p3_write);
4399 } 4535 }
@@ -4402,63 +4538,68 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4402 switch (part_type) 4538 switch (part_type)
4403 { 4539 {
4404 case EDJE_PART_TYPE_IMAGE: 4540 case EDJE_PART_TYPE_IMAGE:
4405 p3->type.common.spec.image.l = INTP(p1->type.common.spec.image.l, p2->type.common.spec.image.l, pos); 4541 _edje_calc_params_need_type_common(p3);
4406 p3->type.common.spec.image.r = INTP(p1->type.common.spec.image.r, p2->type.common.spec.image.r, pos); 4542 p3->type.common->spec.image.l = INTP(p1->type.common->spec.image.l, p2->type.common->spec.image.l, pos);
4407 p3->type.common.spec.image.t = INTP(p1->type.common.spec.image.t, p2->type.common.spec.image.t, pos); 4543 p3->type.common->spec.image.r = INTP(p1->type.common->spec.image.r, p2->type.common->spec.image.r, pos);
4408 p3->type.common.spec.image.b = INTP(p1->type.common.spec.image.b, p2->type.common.spec.image.b, pos); 4544 p3->type.common->spec.image.t = INTP(p1->type.common->spec.image.t, p2->type.common->spec.image.t, pos);
4409 p3->type.common.spec.image.border_scale_by = FFP(p1->type.common.spec.image.border_scale_by, p2->type.common.spec.image.border_scale_by, pos); 4545 p3->type.common->spec.image.b = INTP(p1->type.common->spec.image.b, p2->type.common->spec.image.b, pos);
4546 p3->type.common->spec.image.border_scale_by = FFP(p1->type.common->spec.image.border_scale_by, p2->type.common->spec.image.border_scale_by, pos);
4410 4547
4411 case EDJE_PART_TYPE_PROXY: 4548 case EDJE_PART_TYPE_PROXY:
4412 p3->type.common.fill.x = INTP(p1->type.common.fill.x, p2->type.common.fill.x, pos); 4549 _edje_calc_params_need_type_common(p3);
4413 p3->type.common.fill.y = INTP(p1->type.common.fill.y, p2->type.common.fill.y, pos); 4550 p3->type.common->fill.x = INTP(p1->type.common->fill.x, p2->type.common->fill.x, pos);
4414 p3->type.common.fill.w = INTP(p1->type.common.fill.w, p2->type.common.fill.w, pos); 4551 p3->type.common->fill.y = INTP(p1->type.common->fill.y, p2->type.common->fill.y, pos);
4415 p3->type.common.fill.h = INTP(p1->type.common.fill.h, p2->type.common.fill.h, pos); 4552 p3->type.common->fill.w = INTP(p1->type.common->fill.w, p2->type.common->fill.w, pos);
4553 p3->type.common->fill.h = INTP(p1->type.common->fill.h, p2->type.common->fill.h, pos);
4416 break; 4554 break;
4417 4555
4418 case EDJE_PART_TYPE_TEXT: 4556 case EDJE_PART_TYPE_TEXT:
4419 p3->type.text.size = INTP(p1->type.text.size, p2->type.text.size, pos); 4557 _edje_calc_params_need_type_text(p3);
4558 p3->type.text->size = INTP(p1->type.text->size, p2->type.text->size, pos);
4420 4559
4421 /* no break as we share code with the TEXTBLOCK type here. Intended fall-through */ 4560 /* no break as we share code with the TEXTBLOCK type here. Intended fall-through */
4422 case EDJE_PART_TYPE_TEXTBLOCK: 4561 case EDJE_PART_TYPE_TEXTBLOCK:
4423 p3->type.text.color2.r = INTP(p1->type.text.color2.r, p2->type.text.color2.r, pos2); 4562 _edje_calc_params_need_type_text(p3);
4424 p3->type.text.color2.g = INTP(p1->type.text.color2.g, p2->type.text.color2.g, pos2); 4563 p3->type.text->color2.r = INTP(p1->type.text->color2.r, p2->type.text->color2.r, pos2);
4425 p3->type.text.color2.b = INTP(p1->type.text.color2.b, p2->type.text.color2.b, pos2); 4564 p3->type.text->color2.g = INTP(p1->type.text->color2.g, p2->type.text->color2.g, pos2);
4426 p3->type.text.color2.a = INTP(p1->type.text.color2.a, p2->type.text.color2.a, pos2); 4565 p3->type.text->color2.b = INTP(p1->type.text->color2.b, p2->type.text->color2.b, pos2);
4427 4566 p3->type.text->color2.a = INTP(p1->type.text->color2.a, p2->type.text->color2.a, pos2);
4428 p3->type.text.color3.r = INTP(p1->type.text.color3.r, p2->type.text.color3.r, pos2); 4567
4429 p3->type.text.color3.g = INTP(p1->type.text.color3.g, p2->type.text.color3.g, pos2); 4568 p3->type.text->color3.r = INTP(p1->type.text->color3.r, p2->type.text->color3.r, pos2);
4430 p3->type.text.color3.b = INTP(p1->type.text.color3.b, p2->type.text.color3.b, pos2); 4569 p3->type.text->color3.g = INTP(p1->type.text->color3.g, p2->type.text->color3.g, pos2);
4431 p3->type.text.color3.a = INTP(p1->type.text.color3.a, p2->type.text.color3.a, pos2); 4570 p3->type.text->color3.b = INTP(p1->type.text->color3.b, p2->type.text->color3.b, pos2);
4432 4571 p3->type.text->color3.a = INTP(p1->type.text->color3.a, p2->type.text->color3.a, pos2);
4433 p3->type.text.align.x = FFP(p1->type.text.align.x, p2->type.text.align.x, pos); 4572
4434 p3->type.text.align.y = FFP(p1->type.text.align.y, p2->type.text.align.y, pos); 4573 p3->type.text->align.x = FFP(p1->type.text->align.x, p2->type.text->align.x, pos);
4435 p3->type.text.ellipsis = TO_DOUBLE(FINTP(p1->type.text.ellipsis, p2->type.text.ellipsis, pos2)); 4574 p3->type.text->align.y = FFP(p1->type.text->align.y, p2->type.text->align.y, pos);
4575 p3->type.text->ellipsis = TO_DOUBLE(FINTP(p1->type.text->ellipsis, p2->type.text->ellipsis, pos2));
4436 break; 4576 break;
4437 case EDJE_PART_TYPE_MESH_NODE: 4577 case EDJE_PART_TYPE_MESH_NODE:
4438 p3->type.node.frame = INTP(p1->type.node.frame, p2->type.node.frame, pos); 4578 _edje_calc_params_need_type_node(p3);
4439 p3->type.node.data[0] = INTP(p1->type.node.data[0], p2->type.node.data[0], pos); 4579 p3->type.node->frame = INTP(p1->type.node->frame, p2->type.node->frame, pos);
4580 p3->type.node->data[0] = INTP(p1->type.node->data[0], p2->type.node->data[0], pos);
4440 4581
4441 p3->type.node.point.x = FFP(p1->type.node.point.x, p2->type.node.point.x, pos); 4582 p3->type.node->point.x = FFP(p1->type.node->point.x, p2->type.node->point.x, pos);
4442 p3->type.node.point.y = FFP(p1->type.node.point.y, p2->type.node.point.y, pos); 4583 p3->type.node->point.y = FFP(p1->type.node->point.y, p2->type.node->point.y, pos);
4443 p3->type.node.point.z = FFP(p1->type.node.point.z, p2->type.node.point.z, pos); 4584 p3->type.node->point.z = FFP(p1->type.node->point.z, p2->type.node->point.z, pos);
4444 4585
4445 p3->type.node.scale_3d.x = FFP(p1->type.node.scale_3d.x, p2->type.node.scale_3d.x, pos); 4586 p3->type.node->scale_3d.x = FFP(p1->type.node->scale_3d.x, p2->type.node->scale_3d.x, pos);
4446 p3->type.node.scale_3d.y = FFP(p1->type.node.scale_3d.y, p2->type.node.scale_3d.y, pos); 4587 p3->type.node->scale_3d.y = FFP(p1->type.node->scale_3d.y, p2->type.node->scale_3d.y, pos);
4447 p3->type.node.scale_3d.z = FFP(p1->type.node.scale_3d.z, p2->type.node.scale_3d.z, pos); 4588 p3->type.node->scale_3d.z = FFP(p1->type.node->scale_3d.z, p2->type.node->scale_3d.z, pos);
4448 break; 4589 break;
4449 case EDJE_PART_TYPE_CAMERA: 4590 case EDJE_PART_TYPE_CAMERA:
4450 p3->type.node.data[0] = FFP(p1->type.node.data[0], p2->type.node.data[0], pos); 4591 p3->type.node->data[0] = FFP(p1->type.node->data[0], p2->type.node->data[0], pos);
4451 4592
4452 p3->type.node.point.x = FFP(p1->type.node.point.x, p2->type.node.point.x, pos); 4593 p3->type.node->point.x = FFP(p1->type.node->point.x, p2->type.node->point.x, pos);
4453 p3->type.node.point.y = FFP(p1->type.node.point.y, p2->type.node.point.y, pos); 4594 p3->type.node->point.y = FFP(p1->type.node->point.y, p2->type.node->point.y, pos);
4454 p3->type.node.point.z = FFP(p1->type.node.point.z, p2->type.node.point.z, pos); 4595 p3->type.node->point.z = FFP(p1->type.node->point.z, p2->type.node->point.z, pos);
4455 break; 4596 break;
4456 case EDJE_PART_TYPE_LIGHT: 4597 case EDJE_PART_TYPE_LIGHT:
4457 p3->type.node.data[0] = FFP(p1->type.node.data[0], p2->type.node.data[0], pos); 4598 p3->type.node->data[0] = FFP(p1->type.node->data[0], p2->type.node->data[0], pos);
4458 4599
4459 p3->type.node.point.x = FFP(p1->type.node.point.x, p2->type.node.point.x, pos); 4600 p3->type.node->point.x = FFP(p1->type.node->point.x, p2->type.node->point.x, pos);
4460 p3->type.node.point.y = FFP(p1->type.node.point.y, p2->type.node.point.y, pos); 4601 p3->type.node->point.y = FFP(p1->type.node->point.y, p2->type.node->point.y, pos);
4461 p3->type.node.point.z = FFP(p1->type.node.point.z, p2->type.node.point.z, pos); 4602 p3->type.node->point.z = FFP(p1->type.node->point.z, p2->type.node->point.z, pos);
4462 break; 4603 break;
4463 } 4604 }
4464 4605
@@ -4474,19 +4615,22 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4474 p3->lighted = p3->mapped ? p1->lighted | p2->lighted : 0; 4615 p3->lighted = p3->mapped ? p1->lighted | p2->lighted : 0;
4475 if (p3->mapped) 4616 if (p3->mapped)
4476 { 4617 {
4618 _edje_calc_params_need_ext(p1);
4619 _edje_calc_params_need_ext(p2);
4620 _edje_calc_params_need_ext(p3);
4477 EINA_COW_CALC_MAP_BEGIN(p3, p3_write) 4621 EINA_COW_CALC_MAP_BEGIN(p3, p3_write)
4478 { 4622 {
4479 p3_write->center.x = INTP(p1->map->center.x, p2->map->center.x, pos); 4623 p3_write->center.x = INTP(p1->ext->map->center.x, p2->ext->map->center.x, pos);
4480 p3_write->center.y = INTP(p1->map->center.y, p2->map->center.y, pos); 4624 p3_write->center.y = INTP(p1->ext->map->center.y, p2->ext->map->center.y, pos);
4481 p3_write->center.z = INTP(p1->map->center.z, p2->map->center.z, pos); 4625 p3_write->center.z = INTP(p1->ext->map->center.z, p2->ext->map->center.z, pos);
4482 p3_write->rotation.x = FFP(p1->map->rotation.x, p2->map->rotation.x, pos); 4626 p3_write->rotation.x = FFP(p1->ext->map->rotation.x, p2->ext->map->rotation.x, pos);
4483 p3_write->rotation.y = FFP(p1->map->rotation.y, p2->map->rotation.y, pos); 4627 p3_write->rotation.y = FFP(p1->ext->map->rotation.y, p2->ext->map->rotation.y, pos);
4484 p3_write->rotation.z = FFP(p1->map->rotation.z, p2->map->rotation.z, pos); 4628 p3_write->rotation.z = FFP(p1->ext->map->rotation.z, p2->ext->map->rotation.z, pos);
4485 p3_write->zoom.x = FFP(p1->map->zoom.x, p2->map->zoom.x, pos); 4629 p3_write->zoom.x = FFP(p1->ext->map->zoom.x, p2->ext->map->zoom.x, pos);
4486 p3_write->zoom.y = FFP(p1->map->zoom.y, p2->map->zoom.y, pos); 4630 p3_write->zoom.y = FFP(p1->ext->map->zoom.y, p2->ext->map->zoom.y, pos);
4487 4631
4488#define MIX(P1, P2, P3, pos, info) \ 4632#define MIX(P1, P2, P3, pos, info) \
4489 P3->info = P1->map->info + TO_INT(SCALE(pos, P2->map->info - P1->map->info)); 4633 P3->info = P1->ext->map->info + TO_INT(SCALE(pos, P2->ext->map->info - P1->ext->map->info));
4490 map_colors_free = _map_colors_interp(p1, p2, p3_write, pos); 4634 map_colors_free = _map_colors_interp(p1, p2, p3_write, pos);
4491 4635
4492 if (p1->lighted && p2->lighted) 4636 if (p1->lighted && p2->lighted)
@@ -4503,11 +4647,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4503 } 4647 }
4504 else if (p1->lighted) 4648 else if (p1->lighted)
4505 { 4649 {
4506 memcpy(&p3_write->light, &p1->map->light, sizeof (p1->map->light)); 4650 memcpy(&p3_write->light, &p1->ext->map->light, sizeof (p1->ext->map->light));
4507 } 4651 }
4508 else if (p2->lighted) 4652 else if (p2->lighted)
4509 { 4653 {
4510 memcpy(&p3_write->light, &p2->map->light, sizeof (p2->map->light)); 4654 memcpy(&p3_write->light, &p2->ext->map->light, sizeof (p2->ext->map->light));
4511 } 4655 }
4512 4656
4513 if (p1->persp_on && p2->persp_on) 4657 if (p1->persp_on && p2->persp_on)
@@ -4519,21 +4663,18 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4519 } 4663 }
4520 else if (p1->persp_on) 4664 else if (p1->persp_on)
4521 { 4665 {
4522 memcpy(&p3_write->persp, &p1->map->persp, sizeof (p1->map->persp)); 4666 memcpy(&p3_write->persp, &p1->ext->map->persp, sizeof (p1->ext->map->persp));
4523 } 4667 }
4524 else if (p2->persp_on) 4668 else if (p2->persp_on)
4525 { 4669 {
4526 memcpy(&p3_write->persp, &p2->map->persp, sizeof (p2->map->persp)); 4670 memcpy(&p3_write->persp, &p2->ext->map->persp, sizeof (p2->ext->map->persp));
4527 } 4671 }
4528 } 4672 }
4529 EINA_COW_CALC_MAP_END(p3, p3_write); 4673 EINA_COW_CALC_MAP_END(p3, p3_write);
4530 } 4674 }
4531 4675
4532#ifndef EDJE_CALC_CACHE 4676#ifndef EDJE_CALC_CACHE
4533 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&lp2.map); 4677 _edje_calc_params_clear(&lp2);
4534#ifdef HAVE_EPHYSICS
4535 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&lp2.physics);
4536#endif
4537#endif 4678#endif
4538 pf = p3; 4679 pf = p3;
4539 } 4680 }
@@ -4586,26 +4727,36 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4586 4727
4587 if (state) 4728 if (state)
4588 { 4729 {
4730 Eina_Bool needext = EINA_FALSE;
4589 const Edje_Calc_Params_Map *map; 4731 const Edje_Calc_Params_Map *map;
4590#ifdef HAVE_EPHYSICS 4732#ifdef HAVE_EPHYSICS
4591 const Edje_Calc_Params_Physics *physics; 4733 const Edje_Calc_Params_Physics *physics;
4592#endif 4734#endif
4593 4735
4594 map = state->map; 4736 if (state->ext)
4737 {
4738 needext = EINA_TRUE;
4739 map = state->ext->map;
4595#ifdef HAVE_EPHYSICS 4740#ifdef HAVE_EPHYSICS
4596 physics = state->physics; 4741 physics = state->ext->physics;
4597#endif 4742#endif
4743 }
4598 4744
4599 memcpy(state, pf, sizeof (Edje_Calc_Params)); 4745 _edje_part_calc_params_memcpy(state, pf, ep->part->type);
4600 4746
4601 state->map = map; 4747 if (needext)
4748 {
4749 state->ext = NULL;
4750 _edje_calc_params_need_ext(state);
4751 state->ext->map = map;
4602#ifdef HAVE_EPHYSICS 4752#ifdef HAVE_EPHYSICS
4603 state->physics = physics; 4753 state->ext->physics = physics;
4604#endif 4754#endif
4605 eina_cow_memcpy(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&state->map, pf->map); 4755 eina_cow_memcpy(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&state->ext->map, pf->ext->map);
4606#ifdef HAVE_EPHYSICS 4756#ifdef HAVE_EPHYSICS
4607 eina_cow_memcpy(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&state->physics, pf->physics); 4757 eina_cow_memcpy(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&state->ext->physics, pf->ext->physics);
4608#endif 4758#endif
4759 }
4609 } 4760 }
4610 4761
4611 ep->req = pf->req; 4762 ep->req = pf->req;
@@ -4701,7 +4852,10 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4701 if (((ep->prev_description) && 4852 if (((ep->prev_description) &&
4702 (chosen_desc != ep->prev_description)) || 4853 (chosen_desc != ep->prev_description)) ||
4703 (pf != p1)) 4854 (pf != p1))
4704 _edje_physics_body_props_update(ed, ep, pf, !pf->physics->ignore_part_pos); 4855 {
4856 _edje_calc_params_need_ext(pf);
4857 _edje_physics_body_props_update(ed, ep, pf, !pf->ext->physics->ignore_part_pos);
4858 }
4705 } 4859 }
4706 else 4860 else
4707 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y); 4861 efl_gfx_position_set(ep->object, ed->x + pf->final.x, ed->y + pf->final.y);
@@ -4719,8 +4873,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4719 _edje_entry_real_part_configure(ed, ep); 4873 _edje_entry_real_part_configure(ed, ep);
4720 4874
4721 /* handle clip overrides */ 4875 /* handle clip overrides */
4722 if (pf->clip_to && pf->clip_to->object) 4876 if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object))
4723 evas_object_clip_set(ep->object, pf->clip_to->object); 4877 evas_object_clip_set(ep->object, pf->ext->clip_to->object);
4724 else if (ep->part->clip_to_id >= 0) 4878 else if (ep->part->clip_to_id >= 0)
4725 evas_object_clip_set(ep->object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object); 4879 evas_object_clip_set(ep->object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object);
4726 else 4880 else
@@ -4764,7 +4918,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4764 4918
4765 evas_canvas3d_camera_projection_perspective_set(camera, pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect, pd_camera->camera.camera.frustum_near, pd_camera->camera.camera.frustum_far); 4919 evas_canvas3d_camera_projection_perspective_set(camera, pd_camera->camera.camera.fovy, pd_camera->camera.camera.aspect, pd_camera->camera.camera.frustum_near, pd_camera->camera.camera.frustum_far);
4766 4920
4767 evas_canvas3d_node_position_set(ep->node, pf->type.node.point.x, pf->type.node.point.y, pf->type.node.point.z); 4921 _edje_calc_params_need_type_node(pf);
4922 evas_canvas3d_node_position_set(ep->node, pf->type.node->point.x, pf->type.node->point.y, pf->type.node->point.z);
4768 switch (pd_camera->camera.orientation.type) 4923 switch (pd_camera->camera.orientation.type)
4769 { 4924 {
4770 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: 4925 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE:
@@ -4801,7 +4956,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4801 evas_canvas3d_light_directional_set(light_node, EINA_TRUE); 4956 evas_canvas3d_light_directional_set(light_node, EINA_TRUE);
4802 evas_canvas3d_light_projection_perspective_set(light_node, pd_light->light.light.fovy, pd_light->light.light.aspect, pd_light->light.light.frustum_near, pd_light->light.light.frustum_far); 4957 evas_canvas3d_light_projection_perspective_set(light_node, pd_light->light.light.fovy, pd_light->light.light.aspect, pd_light->light.light.frustum_near, pd_light->light.light.frustum_far);
4803 4958
4804 evas_canvas3d_node_position_set(ep->node, pf->type.node.point.x, pf->type.node.point.y, pf->type.node.point.z); 4959 _edje_calc_params_need_type_node(pf);
4960 evas_canvas3d_node_position_set(ep->node, pf->type.node->point.x, pf->type.node->point.y, pf->type.node->point.z);
4805 switch (pd_light->light.orientation.type) 4961 switch (pd_light->light.orientation.type)
4806 { 4962 {
4807 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: 4963 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE:
@@ -4862,10 +5018,11 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4862 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas); 5018 primitive = eo_add(EVAS_CANVAS3D_PRIMITIVE_CLASS, ed->base->evas);
4863 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive); 5019 evas_canvas3d_primitive_form_set(primitive, pd_mesh_node->mesh_node.mesh.primitive);
4864 5020
4865 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame); 5021 _edje_calc_params_need_type_node(pf);
5022 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node->frame);
4866 if (!frame_exist) 5023 if (!frame_exist)
4867 { 5024 {
4868 evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node.frame, material); 5025 evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node->frame, material);
4869 } 5026 }
4870 evas_canvas3d_mesh_from_primitive_set(mesh, 0, primitive); 5027 evas_canvas3d_mesh_from_primitive_set(mesh, 0, primitive);
4871 break; 5028 break;
@@ -4892,17 +5049,18 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4892 } 5049 }
4893 } 5050 }
4894 5051
4895 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node.frame); 5052 _edje_calc_params_need_type_node(pf);
5053 frame_exist = evas_canvas3d_mesh_frame_exist(mesh, pf->type.node->frame);
4896 if (!frame_exist) 5054 if (!frame_exist)
4897 { 5055 {
4898 evas_canvas3d_mesh_frame_add(mesh, pf->type.node.frame); 5056 evas_canvas3d_mesh_frame_add(mesh, pf->type.node->frame);
4899 evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node.frame, material); 5057 evas_canvas3d_mesh_frame_material_set(mesh, pf->type.node->frame, material);
4900 } 5058 }
4901 evas_canvas3d_mesh_shader_mode_set(mesh, pd_mesh_node->mesh_node.properties.shade); 5059 evas_canvas3d_mesh_shader_mode_set(mesh, pd_mesh_node->mesh_node.properties.shade);
4902 evas_canvas3d_mesh_vertex_assembly_set(mesh, pd_mesh_node->mesh_node.mesh.assembly); 5060 evas_canvas3d_mesh_vertex_assembly_set(mesh, pd_mesh_node->mesh_node.mesh.assembly);
4903 evas_canvas3d_node_mesh_frame_set(ep->node, mesh, pf->type.node.frame); 5061 evas_canvas3d_node_mesh_frame_set(ep->node, mesh, pf->type.node->frame);
4904 evas_canvas3d_node_scale_set(ep->node, pf->type.node.scale_3d.x, pf->type.node.scale_3d.y, pf->type.node.scale_3d.z); 5062 evas_canvas3d_node_scale_set(ep->node, pf->type.node->scale_3d.x, pf->type.node->scale_3d.y, pf->type.node->scale_3d.z);
4905 evas_canvas3d_node_position_set(ep->node, pf->type.node.point.x, pf->type.node.point.y, pf->type.node.point.z); 5063 evas_canvas3d_node_position_set(ep->node, pf->type.node->point.x, pf->type.node->point.y, pf->type.node->point.z);
4906 switch (pd_mesh_node->mesh_node.orientation.type) 5064 switch (pd_mesh_node->mesh_node.orientation.type)
4907 { 5065 {
4908 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE: 5066 case EVAS_CANVAS3D_NODE_ORIENTATION_TYPE_NONE:
@@ -4980,8 +5138,8 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
4980 (ep->typedata.swallow)) && 5138 (ep->typedata.swallow)) &&
4981 (ep->typedata.swallow->swallowed_object)) 5139 (ep->typedata.swallow->swallowed_object))
4982 { 5140 {
4983 if (pf->clip_to && pf->clip_to->object) 5141 if ((pf->ext) && (pf->ext->clip_to) && (pf->ext->clip_to->object))
4984 evas_object_clip_set(ep->typedata.swallow->swallowed_object, pf->clip_to->object); 5142 evas_object_clip_set(ep->typedata.swallow->swallowed_object, pf->ext->clip_to->object);
4985 else if (ep->part->clip_to_id >= 0) 5143 else if (ep->part->clip_to_id >= 0)
4986 evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object); 5144 evas_object_clip_set(ep->typedata.swallow->swallowed_object, ed->table_parts[ep->part->clip_to_id % ed->table_parts_size]->object);
4987 else 5145 else
@@ -5065,12 +5223,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5065 5223
5066 if (pf == &lp3) 5224 if (pf == &lp3)
5067 { 5225 {
5068 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&lp3.map); 5226 _edje_calc_params_clear(&lp3);
5069 lp3.map = NULL;
5070#ifdef HAVE_EPHYSICS
5071 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&lp3.physics);
5072 lp3.physics = NULL;
5073#endif
5074 } 5227 }
5075 5228
5076#ifdef EDJE_CALC_CACHE 5229#ifdef EDJE_CALC_CACHE
@@ -5080,9 +5233,7 @@ _edje_part_recalc(Edje *ed, Edje_Real_Part *ep, int flags, Edje_Calc_Params *sta
5080 ep->invalidate = EINA_FALSE; 5233 ep->invalidate = EINA_FALSE;
5081 } 5234 }
5082#else 5235#else
5083 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&lp1.map); 5236 _edje_calc_params_clear(&lp1);
5084#ifdef HAVE_EPHYSICS
5085 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&lp1.physics);
5086#endif
5087#endif 5237#endif
5238
5088} 5239}
diff --git a/src/lib/edje/edje_embryo.c b/src/lib/edje/edje_embryo.c
index f7eeab68c9..1b899d71e9 100644
--- a/src/lib/edje/edje_embryo.c
+++ b/src/lib/edje/edje_embryo.c
@@ -2123,11 +2123,6 @@ case EDJE_PART_TYPE_##Short: \
2123 2123
2124 memset(rp->custom, 0, sizeof (Edje_Real_Part_State)); 2124 memset(rp->custom, 0, sizeof (Edje_Real_Part_State));
2125 2125
2126 rp->custom->p.map = eina_cow_alloc(_edje_calc_params_map_cow);
2127#ifdef HAVE_EPHYSICS
2128 rp->custom->p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
2129#endif
2130
2131 *d = *parent; 2126 *d = *parent;
2132 2127
2133 d->state.name = (char *)eina_stringshare_add("custom"); 2128 d->state.name = (char *)eina_stringshare_add("custom");
diff --git a/src/lib/edje/edje_load.c b/src/lib/edje/edje_load.c
index e0e21d3a81..cf6b1bf655 100644
--- a/src/lib/edje/edje_load.c
+++ b/src/lib/edje/edje_load.c
@@ -704,11 +704,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
704 704
705 memset(rp, 0, sizeof (Edje_Real_Part)); 705 memset(rp, 0, sizeof (Edje_Real_Part));
706 706
707 rp->param1.p.map = eina_cow_alloc(_edje_calc_params_map_cow);
708#ifdef HAVE_EPHYSICS
709 rp->param1.p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
710#endif
711
712 if ((ep->dragable.x != 0) || (ep->dragable.y != 0)) 707 if ((ep->dragable.x != 0) || (ep->dragable.y != 0))
713 { 708 {
714 rp->drag = calloc(1, sizeof (Edje_Real_Part_Drag)); 709 rp->drag = calloc(1, sizeof (Edje_Real_Part_Drag));
@@ -1724,9 +1719,8 @@ _edje_file_del(Edje *ed)
1724 { 1719 {
1725 free(rp->param2->set); 1720 free(rp->param2->set);
1726 rp->param2->set = NULL; 1721 rp->param2->set = NULL;
1727 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->param2->p.map); 1722#ifdef EDJE_CALC_CACHE
1728#ifdef HAVE_EPHYSICS 1723 _edje_calc_params_clear(&(rp->param2->p));
1729 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->param2->p.physics);
1730#endif 1724#endif
1731 } 1725 }
1732 eina_mempool_free(_edje_real_part_state_mp, rp->param2); 1726 eina_mempool_free(_edje_real_part_state_mp, rp->param2);
@@ -1735,26 +1729,23 @@ _edje_file_del(Edje *ed)
1735 { 1729 {
1736 free(rp->custom->set); 1730 free(rp->custom->set);
1737 rp->custom->set = NULL; 1731 rp->custom->set = NULL;
1738 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->custom->p.map); 1732#ifdef EDJE_CALC_CACHE
1739#ifdef HAVE_EPHYSICS 1733 _edje_calc_params_clear(&(rp->custom->p));
1740 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->custom->p.physics);
1741#endif 1734#endif
1742 } 1735 }
1743 eina_mempool_free(_edje_real_part_state_mp, rp->custom); 1736 eina_mempool_free(_edje_real_part_state_mp, rp->custom);
1744 1737
1745 if (rp->current) 1738 if (rp->current)
1746 { 1739 {
1747 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map); 1740#ifdef EDJE_CALC_CACHE
1748#ifdef HAVE_EPHYSICS 1741 _edje_calc_params_clear(rp->current);
1749 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
1750#endif 1742#endif
1751 free(rp->current); 1743 free(rp->current);
1752 rp->current = NULL; 1744 rp->current = NULL;
1753 } 1745 }
1754 _edje_unref(ed); 1746 _edje_unref(ed);
1755 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->param1.p.map); 1747#ifdef EDJE_CALC_CACHE
1756#ifdef HAVE_EPHYSICS 1748 _edje_calc_params_clear(&(rp->param1.p));
1757 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->param1.p.physics);
1758#endif 1749#endif
1759 eina_mempool_free(_edje_real_part_mp, rp); 1750 eina_mempool_free(_edje_real_part_mp, rp);
1760 ed->table_parts[i] = NULL; 1751 ed->table_parts[i] = NULL;
diff --git a/src/lib/edje/edje_private.h b/src/lib/edje/edje_private.h
index 31db5f00a7..b97c7e518a 100644
--- a/src/lib/edje/edje_private.h
+++ b/src/lib/edje/edje_private.h
@@ -1794,52 +1794,71 @@ struct _Edje_Calc_Params_Physics
1794 unsigned char ignore_part_pos; //1 1794 unsigned char ignore_part_pos; //1
1795}; 1795};
1796 1796
1797typedef struct _Edje_Calc_Params_Type_Common Edje_Calc_Params_Type_Common;
1798typedef struct _Edje_Calc_Params_Type_Text Edje_Calc_Params_Type_Text;
1799typedef struct _Edje_Calc_Params_Type_Node Edje_Calc_Params_Type_Node;
1800
1801struct _Edje_Calc_Params_Type_Common
1802{
1803 struct {
1804 int x, y, w, h; // 16
1805 } fill; // 16
1806 union {
1807 struct {
1808 unsigned short l, r, t, b; // 8
1809 FLOAT_T border_scale_by; // 8
1810 } image; // 16
1811 } spec; // 16
1812}; // 32
1813
1814struct _Edje_Calc_Params_Type_Text
1815{
1816 Edje_Alignment align; /* text alignment within bounds */ // 16
1817 double ellipsis; // 8
1818 int size; // 4
1819 Edje_Color color2, color3; // 8
1820}; // 36
1821
1822struct _Edje_Calc_Params_Type_Node
1823{
1824 FLOAT_T data[6]; // 48
1825 Edje_3D_Vec point; // 24
1826 Edje_3D_Vec scale_3d; // 24
1827 int frame; // 4
1828}; // 100
1829
1830typedef struct _Edje_Calc_Params_Ext Edje_Calc_Params_Ext;
1831
1832struct _Edje_Calc_Params_Ext
1833{
1834 Edje_Rectangle req_drag; // 16
1835 const Edje_Calc_Params_Map *map; // 4/8
1836#ifdef HAVE_EPHYSICS
1837 const Edje_Calc_Params_Physics *physics; // 4/8
1838#endif
1839 Edje_Real_Part *clip_to; /* clip override @since 1.15 */ // 4/8
1840};
1841
1797struct _Edje_Calc_Params 1842struct _Edje_Calc_Params
1798{ 1843{
1844 union {
1845 Edje_Calc_Params_Type_Common *common;
1846 Edje_Calc_Params_Type_Text *text;
1847 Edje_Calc_Params_Type_Node *node;
1848 } type; // 4/8
1849 Edje_Calc_Params_Ext *ext; // 4/8
1799 struct { 1850 struct {
1800 FLOAT_T x, y, w, h; // 32 1851 FLOAT_T x, y, w, h; // 32
1801 } eval; 1852 } eval;
1802 Edje_Rectangle final; // 16 1853 Edje_Rectangle final; // 16
1803 Edje_Rectangle req; // 16 1854 Edje_Rectangle req; // 16
1804 Edje_Rectangle req_drag; // 16
1805 Edje_Color color; // 4 1855 Edje_Color color; // 4
1806 union {
1807 struct {
1808 struct {
1809 int x, y, w, h; // 16
1810 } fill; // 16
1811
1812 union {
1813 struct {
1814 unsigned short l, r, t, b; // 8
1815 FLOAT_T border_scale_by; // 8
1816 } image; // 16
1817 } spec; // 16
1818 } common; // 32
1819 struct {
1820 Edje_Alignment align; /* text alignment within bounds */ // 16
1821 double ellipsis; // 8
1822 int size; // 4
1823 Edje_Color color2, color3; // 8
1824 } text; // 36
1825 struct {
1826 FLOAT_T data[6]; // 48
1827 Edje_3D_Vec point; // 24
1828 Edje_3D_Vec scale_3d; // 24
1829 int frame; // 4
1830 } node; // 100
1831 } type; // 100
1832 const Edje_Calc_Params_Map *map; // 4/8
1833#ifdef HAVE_EPHYSICS
1834 const Edje_Calc_Params_Physics *physics; // 4/8
1835#endif
1836 Edje_Real_Part *clip_to; /* state clip override @since 1.15 */ // 4/8
1837 unsigned char persp_on : 1; 1856 unsigned char persp_on : 1;
1838 unsigned char lighted : 1; 1857 unsigned char lighted : 1;
1839 unsigned char mapped : 1; 1858 unsigned char mapped : 1;
1840 unsigned char visible : 1; 1859 unsigned char visible : 1;
1841 unsigned char smooth : 1; // 1 1860 unsigned char smooth : 1; // 1
1842}; // 197/209(rounded up for alignment: 200/212) 1861}; // 77/85(rounded up for alignment: 80/88)
1843 1862
1844struct _Edje_Real_Part_Set 1863struct _Edje_Real_Part_Set
1845{ 1864{
@@ -2321,6 +2340,42 @@ EAPI extern Eina_Mempool *_emp_SNAPSHOT;
2321EAPI extern Eina_Mempool *_emp_part; 2340EAPI extern Eina_Mempool *_emp_part;
2322EAPI extern Eina_Mempool *_emp_VECTOR; 2341EAPI extern Eina_Mempool *_emp_VECTOR;
2323 2342
2343static inline void
2344_edje_calc_params_need_type_common(Edje_Calc_Params *p)
2345{
2346 if (p->type.common) return;
2347 p->type.common = calloc(1, sizeof(Edje_Calc_Params_Type_Common));
2348}
2349
2350static inline void
2351_edje_calc_params_need_type_text(Edje_Calc_Params *p)
2352{
2353 if (p->type.text) return;
2354 p->type.text = calloc(1, sizeof(Edje_Calc_Params_Type_Text));
2355}
2356
2357static inline void
2358_edje_calc_params_need_type_node(Edje_Calc_Params *p)
2359{
2360 if (p->type.node) return;
2361 p->type.node = calloc(1, sizeof(Edje_Calc_Params_Type_Node));
2362}
2363
2364static inline void
2365_edje_calc_params_need_ext(Edje_Calc_Params *p)
2366{
2367 if (p->ext) return;
2368 p->ext = calloc(1, sizeof(Edje_Calc_Params_Ext));
2369 if (!p->ext) return;
2370#ifdef EDJE_CALC_CACHE
2371 p->ext->map = eina_cow_alloc(_edje_calc_params_map_cow);
2372# ifdef HAVE_EPHYSICS
2373 p->ext->physics = eina_cow_alloc(_edje_calc_params_physics_cow);
2374# endif
2375#endif
2376}
2377
2378void _edje_calc_params_clear(Edje_Calc_Params *p);
2324void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4); 2379void _edje_part_pos_set(Edje *ed, Edje_Real_Part *ep, int mode, FLOAT_T pos, FLOAT_T v1, FLOAT_T v2, FLOAT_T v3, FLOAT_T v4);
2325 2380
2326/** Find the description of the part by state name and state value. 2381/** Find the description of the part by state name and state value.
diff --git a/src/lib/edje/edje_program.c b/src/lib/edje/edje_program.c
index 1e3c6bddc4..7cb6222423 100644
--- a/src/lib/edje/edje_program.c
+++ b/src/lib/edje/edje_program.c
@@ -681,17 +681,12 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
681 681
682 tmp = calloc(1, sizeof(Edje_Calc_Params)); 682 tmp = calloc(1, sizeof(Edje_Calc_Params));
683 if (!tmp) goto low_mem_current; 683 if (!tmp) goto low_mem_current;
684 tmp->map = eina_cow_alloc(_edje_calc_params_map_cow);
685#ifdef HAVE_EPHYSICS
686 tmp->physics = eina_cow_alloc(_edje_calc_params_physics_cow);
687#endif
688 _edje_part_recalc(ed, rp, FLAG_XY, tmp); 684 _edje_part_recalc(ed, rp, FLAG_XY, tmp);
689 685
690 if (rp->current) 686 if (rp->current)
691 { 687 {
692 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map); 688#ifdef EDJE_CALC_CACHE
693#ifdef HAVE_EPHYSICS 689 _edje_calc_params_clear(rp->current);
694 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
695#endif 690#endif
696 free(rp->current); 691 free(rp->current);
697 } 692 }
@@ -702,9 +697,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
702low_mem_current: 697low_mem_current:
703 if (rp->current) 698 if (rp->current)
704 { 699 {
705 eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map); 700#ifdef EDJE_CALC_CACHE
706#ifdef HAVE_EPHYSICS 701 _edje_calc_params_clear(rp->current);
707 eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
708#endif 702#endif
709 free(rp->current); 703 free(rp->current);
710 } 704 }
diff --git a/src/lib/edje/edje_text.c b/src/lib/edje/edje_text.c
index d65f0a917b..f622714274 100644
--- a/src/lib/edje/edje_text.c
+++ b/src/lib/edje/edje_text.c
@@ -130,12 +130,13 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
130 *free_text = 0; 130 *free_text = 0;
131 if (sw <= 1) return ""; 131 if (sw <= 1) return "";
132 132
133 if ((params->type.text.ellipsis < 0) || (chosen_desc->text.min_x)) 133 _edje_calc_params_need_type_text(params);
134 if ((params->type.text->ellipsis < 0) || (chosen_desc->text.min_x))
134 return text; 135 return text;
135 136
136 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc)); 137 if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
137 138
138 evas_obj_text_ellipsis_set(ep->object, params->type.text.ellipsis); 139 evas_obj_text_ellipsis_set(ep->object, params->type.text->ellipsis);
139 efl_text_properties_font_set(ep->object, font, size); 140 efl_text_properties_font_set(ep->object, font, size);
140 efl_text_set(ep->object, text); 141 efl_text_set(ep->object, text);
141 efl_gfx_size_set(ep->object, sw, sh); 142 efl_gfx_size_set(ep->object, sw, sh);
@@ -293,8 +294,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
293 sw = TO_INT(params->eval.w); 294 sw = TO_INT(params->eval.w);
294 sh = TO_INT(params->eval.h); 295 sh = TO_INT(params->eval.h);
295 296
296 if (params->type.text.size) 297 _edje_calc_params_need_type_text(params);
297 size = params->type.text.size; 298 if (params->type.text->size)
299 size = params->type.text->size;
298 if (!text) text = ""; 300 if (!text) text = "";
299 301
300 if ((text == ep->typedata.text->cache.in_str) 302 if ((text == ep->typedata.text->cache.in_str)
@@ -309,9 +311,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
309 (ep->typedata.text->cache.in_h == sh) && 311 (ep->typedata.text->cache.in_h == sh) &&
310 (ep->typedata.text->cache.in_str) && 312 (ep->typedata.text->cache.in_str) &&
311 same_text && 313 same_text &&
312 (ep->typedata.text->cache.align_x == params->type.text.align.x) && 314 (ep->typedata.text->cache.align_x == params->type.text->align.x) &&
313 (ep->typedata.text->cache.align_y == params->type.text.align.y) && 315 (ep->typedata.text->cache.align_y == params->type.text->align.y) &&
314 (ep->typedata.text->cache.ellipsis == params->type.text.ellipsis) && 316 (ep->typedata.text->cache.ellipsis == params->type.text->ellipsis) &&
315 (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) && 317 (ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
316 (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) && 318 (ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
317 (ep->typedata.text->cache.in_font == font)) 319 (ep->typedata.text->cache.in_font == font))
@@ -465,7 +467,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
465 else if ((ed->file->version >= 3) && (ed->file->minor >= 6)) 467 else if ((ed->file->version >= 3) && (ed->file->minor >= 6))
466 { 468 {
467 evas_object_text_ellipsis_set(ep->object, 469 evas_object_text_ellipsis_set(ep->object,
468 params->type.text.ellipsis); 470 params->type.text->ellipsis);
469 } 471 }
470 472
471 eina_stringshare_replace(&ep->typedata.text->cache.out_str, text); 473 eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
@@ -473,9 +475,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
473 ep->typedata.text->cache.in_h = sh; 475 ep->typedata.text->cache.in_h = sh;
474 ep->typedata.text->cache.in_font = font; 476 ep->typedata.text->cache.in_font = font;
475 ep->typedata.text->cache.out_size = size; 477 ep->typedata.text->cache.out_size = size;
476 ep->typedata.text->cache.align_x = params->type.text.align.x; 478 ep->typedata.text->cache.align_x = params->type.text->align.x;
477 ep->typedata.text->cache.align_y = params->type.text.align.y; 479 ep->typedata.text->cache.align_y = params->type.text->align.y;
478 ep->typedata.text->cache.ellipsis = params->type.text.ellipsis; 480 ep->typedata.text->cache.ellipsis = params->type.text->ellipsis;
479 ep->typedata.text->cache.fit_x = chosen_desc->text.fit_x; 481 ep->typedata.text->cache.fit_x = chosen_desc->text.fit_x;
480 ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y; 482 ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y;
481arrange_text: 483arrange_text:
@@ -492,7 +494,7 @@ arrange_text:
492 /* Handle alignment */ 494 /* Handle alignment */
493 { 495 {
494 FLOAT_T align_x; 496 FLOAT_T align_x;
495 if (params->type.text.align.x < FROM_INT(0)) 497 if (params->type.text->align.x < FROM_INT(0))
496 { 498 {
497 if (evas_object_text_direction_get(ep->object) == 499 if (evas_object_text_direction_get(ep->object) ==
498 EVAS_BIDI_DIRECTION_RTL) 500 EVAS_BIDI_DIRECTION_RTL)
@@ -506,10 +508,10 @@ arrange_text:
506 } 508 }
507 else 509 else
508 { 510 {
509 align_x = params->type.text.align.x; 511 align_x = params->type.text->align.x;
510 } 512 }
511 ep->typedata.text->offset.x = TO_INT(SCALE(align_x, (sw - tw))); 513 ep->typedata.text->offset.x = TO_INT(SCALE(align_x, (sw - tw)));
512 ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text.align.y, (sh - th))); 514 ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text->align.y, (sh - th)));
513 } 515 }
514 516
515 if (!calc_only) 517 if (!calc_only)
@@ -540,73 +542,73 @@ arrange_text:
540 case EDJE_TEXT_EFFECT_OUTLINE: 542 case EDJE_TEXT_EFFECT_OUTLINE:
541 style = EVAS_TEXT_STYLE_OUTLINE; 543 style = EVAS_TEXT_STYLE_OUTLINE;
542 evas_object_text_outline_color_set(ep->object, 544 evas_object_text_outline_color_set(ep->object,
543 (params->type.text.color2.r * params->type.text.color2.a) / 255, 545 (params->type.text->color2.r * params->type.text->color2.a) / 255,
544 (params->type.text.color2.g * params->type.text.color2.a) / 255, 546 (params->type.text->color2.g * params->type.text->color2.a) / 255,
545 (params->type.text.color2.b * params->type.text.color2.a) / 255, 547 (params->type.text->color2.b * params->type.text->color2.a) / 255,
546 params->type.text.color2.a); 548 params->type.text->color2.a);
547 break; 549 break;
548 550
549 case EDJE_TEXT_EFFECT_SOFT_OUTLINE: 551 case EDJE_TEXT_EFFECT_SOFT_OUTLINE:
550 style = EVAS_TEXT_STYLE_SOFT_OUTLINE; 552 style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
551 evas_object_text_outline_color_set(ep->object, 553 evas_object_text_outline_color_set(ep->object,
552 (params->type.text.color2.r * params->type.text.color2.a) / 255, 554 (params->type.text->color2.r * params->type.text->color2.a) / 255,
553 (params->type.text.color2.g * params->type.text.color2.a) / 255, 555 (params->type.text->color2.g * params->type.text->color2.a) / 255,
554 (params->type.text.color2.b * params->type.text.color2.a) / 255, 556 (params->type.text->color2.b * params->type.text->color2.a) / 255,
555 params->type.text.color2.a); 557 params->type.text->color2.a);
556 break; 558 break;
557 559
558 case EDJE_TEXT_EFFECT_SHADOW: 560 case EDJE_TEXT_EFFECT_SHADOW:
559 style = EVAS_TEXT_STYLE_SHADOW; 561 style = EVAS_TEXT_STYLE_SHADOW;
560 evas_object_text_shadow_color_set(ep->object, 562 evas_object_text_shadow_color_set(ep->object,
561 (params->type.text.color3.r * params->type.text.color3.a) / 255, 563 (params->type.text->color3.r * params->type.text->color3.a) / 255,
562 (params->type.text.color3.g * params->type.text.color3.a) / 255, 564 (params->type.text->color3.g * params->type.text->color3.a) / 255,
563 (params->type.text.color3.b * params->type.text.color3.a) / 255, 565 (params->type.text->color3.b * params->type.text->color3.a) / 255,
564 params->type.text.color3.a); 566 params->type.text->color3.a);
565 break; 567 break;
566 568
567 case EDJE_TEXT_EFFECT_SOFT_SHADOW: 569 case EDJE_TEXT_EFFECT_SOFT_SHADOW:
568 style = EVAS_TEXT_STYLE_SOFT_SHADOW; 570 style = EVAS_TEXT_STYLE_SOFT_SHADOW;
569 evas_object_text_shadow_color_set(ep->object, 571 evas_object_text_shadow_color_set(ep->object,
570 (params->type.text.color3.r * params->type.text.color3.a) / 255, 572 (params->type.text->color3.r * params->type.text->color3.a) / 255,
571 (params->type.text.color3.g * params->type.text.color3.a) / 255, 573 (params->type.text->color3.g * params->type.text->color3.a) / 255,
572 (params->type.text.color3.b * params->type.text.color3.a) / 255, 574 (params->type.text->color3.b * params->type.text->color3.a) / 255,
573 params->type.text.color3.a); 575 params->type.text->color3.a);
574 break; 576 break;
575 577
576 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW: 578 case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
577 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW; 579 style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
578 evas_obj_text_outline_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255, (params->type.text.color2.g * params->type.text.color2.a) / 255, (params->type.text.color2.b * params->type.text.color2.a) / 255, params->type.text.color2.a); 580 evas_obj_text_outline_color_set(ep->object, (params->type.text->color2.r * params->type.text->color2.a) / 255, (params->type.text->color2.g * params->type.text->color2.a) / 255, (params->type.text->color2.b * params->type.text->color2.a) / 255, params->type.text->color2.a);
579 evas_obj_text_shadow_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255, (params->type.text.color3.g * params->type.text.color3.a) / 255, (params->type.text.color3.b * params->type.text.color3.a) / 255, params->type.text.color3.a); 581 evas_obj_text_shadow_color_set(ep->object, (params->type.text->color3.r * params->type.text->color3.a) / 255, (params->type.text->color3.g * params->type.text->color3.a) / 255, (params->type.text->color3.b * params->type.text->color3.a) / 255, params->type.text->color3.a);
580 break; 582 break;
581 583
582 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW: 584 case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
583 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW; 585 style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
584 evas_obj_text_outline_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255, (params->type.text.color2.g * params->type.text.color2.a) / 255, (params->type.text.color2.b * params->type.text.color2.a) / 255, params->type.text.color2.a); 586 evas_obj_text_outline_color_set(ep->object, (params->type.text->color2.r * params->type.text->color2.a) / 255, (params->type.text->color2.g * params->type.text->color2.a) / 255, (params->type.text->color2.b * params->type.text->color2.a) / 255, params->type.text->color2.a);
585 evas_obj_text_shadow_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255, (params->type.text.color3.g * params->type.text.color3.a) / 255, (params->type.text.color3.b * params->type.text.color3.a) / 255, params->type.text.color3.a); 587 evas_obj_text_shadow_color_set(ep->object, (params->type.text->color3.r * params->type.text->color3.a) / 255, (params->type.text->color3.g * params->type.text->color3.a) / 255, (params->type.text->color3.b * params->type.text->color3.a) / 255, params->type.text->color3.a);
586 break; 588 break;
587 589
588 case EDJE_TEXT_EFFECT_FAR_SHADOW: 590 case EDJE_TEXT_EFFECT_FAR_SHADOW:
589 style = EVAS_TEXT_STYLE_FAR_SHADOW; 591 style = EVAS_TEXT_STYLE_FAR_SHADOW;
590 evas_object_text_shadow_color_set(ep->object, 592 evas_object_text_shadow_color_set(ep->object,
591 (params->type.text.color3.r * params->type.text.color3.a) / 255, 593 (params->type.text->color3.r * params->type.text->color3.a) / 255,
592 (params->type.text.color3.g * params->type.text.color3.a) / 255, 594 (params->type.text->color3.g * params->type.text->color3.a) / 255,
593 (params->type.text.color3.b * params->type.text.color3.a) / 255, 595 (params->type.text->color3.b * params->type.text->color3.a) / 255,
594 params->type.text.color3.a); 596 params->type.text->color3.a);
595 break; 597 break;
596 598
597 case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW: 599 case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW:
598 style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW; 600 style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
599 evas_object_text_shadow_color_set(ep->object, 601 evas_object_text_shadow_color_set(ep->object,
600 (params->type.text.color3.r * params->type.text.color3.a) / 255, 602 (params->type.text->color3.r * params->type.text->color3.a) / 255,
601 (params->type.text.color3.g * params->type.text.color3.a) / 255, 603 (params->type.text->color3.g * params->type.text->color3.a) / 255,
602 (params->type.text.color3.b * params->type.text.color3.a) / 255, 604 (params->type.text->color3.b * params->type.text->color3.a) / 255,
603 params->type.text.color3.a); 605 params->type.text->color3.a);
604 break; 606 break;
605 607
606 case EDJE_TEXT_EFFECT_GLOW: 608 case EDJE_TEXT_EFFECT_GLOW:
607 style = EVAS_TEXT_STYLE_GLOW; 609 style = EVAS_TEXT_STYLE_GLOW;
608 evas_obj_text_glow_color_set(ep->object, (params->type.text.color2.r * params->type.text.color2.a) / 255, (params->type.text.color2.g * params->type.text.color2.a) / 255, (params->type.text.color2.b * params->type.text.color2.a) / 255, params->type.text.color2.a); 610 evas_obj_text_glow_color_set(ep->object, (params->type.text->color2.r * params->type.text->color2.a) / 255, (params->type.text->color2.g * params->type.text->color2.a) / 255, (params->type.text->color2.b * params->type.text->color2.a) / 255, params->type.text->color2.a);
609 evas_obj_text_glow2_color_set(ep->object, (params->type.text.color3.r * params->type.text.color3.a) / 255, (params->type.text.color3.g * params->type.text.color3.a) / 255, (params->type.text.color3.b * params->type.text.color3.a) / 255, params->type.text.color3.a); 611 evas_obj_text_glow2_color_set(ep->object, (params->type.text->color3.r * params->type.text->color3.a) / 255, (params->type.text->color3.g * params->type.text->color3.a) / 255, (params->type.text->color3.b * params->type.text->color3.a) / 255, params->type.text->color3.a);
610 break; 612 break;
611 613
612 default: 614 default: