forked from enlightenment/efl
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
This commit is contained in:
parent
a5232bb283
commit
1d6a58cfc9
File diff suppressed because it is too large
Load Diff
|
@ -2123,11 +2123,6 @@ case EDJE_PART_TYPE_##Short: \
|
||||||
|
|
||||||
memset(rp->custom, 0, sizeof (Edje_Real_Part_State));
|
memset(rp->custom, 0, sizeof (Edje_Real_Part_State));
|
||||||
|
|
||||||
rp->custom->p.map = eina_cow_alloc(_edje_calc_params_map_cow);
|
|
||||||
#ifdef HAVE_EPHYSICS
|
|
||||||
rp->custom->p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*d = *parent;
|
*d = *parent;
|
||||||
|
|
||||||
d->state.name = (char *)eina_stringshare_add("custom");
|
d->state.name = (char *)eina_stringshare_add("custom");
|
||||||
|
|
|
@ -704,11 +704,6 @@ _edje_object_file_set_internal(Evas_Object *obj, const Eina_File *file, const ch
|
||||||
|
|
||||||
memset(rp, 0, sizeof (Edje_Real_Part));
|
memset(rp, 0, sizeof (Edje_Real_Part));
|
||||||
|
|
||||||
rp->param1.p.map = eina_cow_alloc(_edje_calc_params_map_cow);
|
|
||||||
#ifdef HAVE_EPHYSICS
|
|
||||||
rp->param1.p.physics = eina_cow_alloc(_edje_calc_params_physics_cow);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if ((ep->dragable.x != 0) || (ep->dragable.y != 0))
|
if ((ep->dragable.x != 0) || (ep->dragable.y != 0))
|
||||||
{
|
{
|
||||||
rp->drag = calloc(1, sizeof (Edje_Real_Part_Drag));
|
rp->drag = calloc(1, sizeof (Edje_Real_Part_Drag));
|
||||||
|
@ -1724,9 +1719,8 @@ _edje_file_del(Edje *ed)
|
||||||
{
|
{
|
||||||
free(rp->param2->set);
|
free(rp->param2->set);
|
||||||
rp->param2->set = NULL;
|
rp->param2->set = NULL;
|
||||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->param2->p.map);
|
#ifdef EDJE_CALC_CACHE
|
||||||
#ifdef HAVE_EPHYSICS
|
_edje_calc_params_clear(&(rp->param2->p));
|
||||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->param2->p.physics);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
eina_mempool_free(_edje_real_part_state_mp, rp->param2);
|
eina_mempool_free(_edje_real_part_state_mp, rp->param2);
|
||||||
|
@ -1735,26 +1729,23 @@ _edje_file_del(Edje *ed)
|
||||||
{
|
{
|
||||||
free(rp->custom->set);
|
free(rp->custom->set);
|
||||||
rp->custom->set = NULL;
|
rp->custom->set = NULL;
|
||||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->custom->p.map);
|
#ifdef EDJE_CALC_CACHE
|
||||||
#ifdef HAVE_EPHYSICS
|
_edje_calc_params_clear(&(rp->custom->p));
|
||||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->custom->p.physics);
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
eina_mempool_free(_edje_real_part_state_mp, rp->custom);
|
eina_mempool_free(_edje_real_part_state_mp, rp->custom);
|
||||||
|
|
||||||
if (rp->current)
|
if (rp->current)
|
||||||
{
|
{
|
||||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map);
|
#ifdef EDJE_CALC_CACHE
|
||||||
#ifdef HAVE_EPHYSICS
|
_edje_calc_params_clear(rp->current);
|
||||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
|
|
||||||
#endif
|
#endif
|
||||||
free(rp->current);
|
free(rp->current);
|
||||||
rp->current = NULL;
|
rp->current = NULL;
|
||||||
}
|
}
|
||||||
_edje_unref(ed);
|
_edje_unref(ed);
|
||||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->param1.p.map);
|
#ifdef EDJE_CALC_CACHE
|
||||||
#ifdef HAVE_EPHYSICS
|
_edje_calc_params_clear(&(rp->param1.p));
|
||||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->param1.p.physics);
|
|
||||||
#endif
|
#endif
|
||||||
eina_mempool_free(_edje_real_part_mp, rp);
|
eina_mempool_free(_edje_real_part_mp, rp);
|
||||||
ed->table_parts[i] = NULL;
|
ed->table_parts[i] = NULL;
|
||||||
|
|
|
@ -1794,52 +1794,71 @@ struct _Edje_Calc_Params_Physics
|
||||||
unsigned char ignore_part_pos; //1
|
unsigned char ignore_part_pos; //1
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Edje_Calc_Params
|
typedef struct _Edje_Calc_Params_Type_Common Edje_Calc_Params_Type_Common;
|
||||||
|
typedef struct _Edje_Calc_Params_Type_Text Edje_Calc_Params_Type_Text;
|
||||||
|
typedef struct _Edje_Calc_Params_Type_Node Edje_Calc_Params_Type_Node;
|
||||||
|
|
||||||
|
struct _Edje_Calc_Params_Type_Common
|
||||||
{
|
{
|
||||||
struct {
|
|
||||||
FLOAT_T x, y, w, h; // 32
|
|
||||||
} eval;
|
|
||||||
Edje_Rectangle final; // 16
|
|
||||||
Edje_Rectangle req; // 16
|
|
||||||
Edje_Rectangle req_drag; // 16
|
|
||||||
Edje_Color color; // 4
|
|
||||||
union {
|
|
||||||
struct {
|
|
||||||
struct {
|
struct {
|
||||||
int x, y, w, h; // 16
|
int x, y, w, h; // 16
|
||||||
} fill; // 16
|
} fill; // 16
|
||||||
|
|
||||||
union {
|
union {
|
||||||
struct {
|
struct {
|
||||||
unsigned short l, r, t, b; // 8
|
unsigned short l, r, t, b; // 8
|
||||||
FLOAT_T border_scale_by; // 8
|
FLOAT_T border_scale_by; // 8
|
||||||
} image; // 16
|
} image; // 16
|
||||||
} spec; // 16
|
} spec; // 16
|
||||||
} common; // 32
|
}; // 32
|
||||||
struct {
|
|
||||||
|
struct _Edje_Calc_Params_Type_Text
|
||||||
|
{
|
||||||
Edje_Alignment align; /* text alignment within bounds */ // 16
|
Edje_Alignment align; /* text alignment within bounds */ // 16
|
||||||
double ellipsis; // 8
|
double ellipsis; // 8
|
||||||
int size; // 4
|
int size; // 4
|
||||||
Edje_Color color2, color3; // 8
|
Edje_Color color2, color3; // 8
|
||||||
} text; // 36
|
}; // 36
|
||||||
struct {
|
|
||||||
|
struct _Edje_Calc_Params_Type_Node
|
||||||
|
{
|
||||||
FLOAT_T data[6]; // 48
|
FLOAT_T data[6]; // 48
|
||||||
Edje_3D_Vec point; // 24
|
Edje_3D_Vec point; // 24
|
||||||
Edje_3D_Vec scale_3d; // 24
|
Edje_3D_Vec scale_3d; // 24
|
||||||
int frame; // 4
|
int frame; // 4
|
||||||
} node; // 100
|
}; // 100
|
||||||
} type; // 100
|
|
||||||
|
typedef struct _Edje_Calc_Params_Ext Edje_Calc_Params_Ext;
|
||||||
|
|
||||||
|
struct _Edje_Calc_Params_Ext
|
||||||
|
{
|
||||||
|
Edje_Rectangle req_drag; // 16
|
||||||
const Edje_Calc_Params_Map *map; // 4/8
|
const Edje_Calc_Params_Map *map; // 4/8
|
||||||
#ifdef HAVE_EPHYSICS
|
#ifdef HAVE_EPHYSICS
|
||||||
const Edje_Calc_Params_Physics *physics; // 4/8
|
const Edje_Calc_Params_Physics *physics; // 4/8
|
||||||
#endif
|
#endif
|
||||||
Edje_Real_Part *clip_to; /* state clip override @since 1.15 */ // 4/8
|
Edje_Real_Part *clip_to; /* clip override @since 1.15 */ // 4/8
|
||||||
|
};
|
||||||
|
|
||||||
|
struct _Edje_Calc_Params
|
||||||
|
{
|
||||||
|
union {
|
||||||
|
Edje_Calc_Params_Type_Common *common;
|
||||||
|
Edje_Calc_Params_Type_Text *text;
|
||||||
|
Edje_Calc_Params_Type_Node *node;
|
||||||
|
} type; // 4/8
|
||||||
|
Edje_Calc_Params_Ext *ext; // 4/8
|
||||||
|
struct {
|
||||||
|
FLOAT_T x, y, w, h; // 32
|
||||||
|
} eval;
|
||||||
|
Edje_Rectangle final; // 16
|
||||||
|
Edje_Rectangle req; // 16
|
||||||
|
Edje_Color color; // 4
|
||||||
unsigned char persp_on : 1;
|
unsigned char persp_on : 1;
|
||||||
unsigned char lighted : 1;
|
unsigned char lighted : 1;
|
||||||
unsigned char mapped : 1;
|
unsigned char mapped : 1;
|
||||||
unsigned char visible : 1;
|
unsigned char visible : 1;
|
||||||
unsigned char smooth : 1; // 1
|
unsigned char smooth : 1; // 1
|
||||||
}; // 197/209(rounded up for alignment: 200/212)
|
}; // 77/85(rounded up for alignment: 80/88)
|
||||||
|
|
||||||
struct _Edje_Real_Part_Set
|
struct _Edje_Real_Part_Set
|
||||||
{
|
{
|
||||||
|
@ -2321,6 +2340,42 @@ EAPI extern Eina_Mempool *_emp_SNAPSHOT;
|
||||||
EAPI extern Eina_Mempool *_emp_part;
|
EAPI extern Eina_Mempool *_emp_part;
|
||||||
EAPI extern Eina_Mempool *_emp_VECTOR;
|
EAPI extern Eina_Mempool *_emp_VECTOR;
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
_edje_calc_params_need_type_common(Edje_Calc_Params *p)
|
||||||
|
{
|
||||||
|
if (p->type.common) return;
|
||||||
|
p->type.common = calloc(1, sizeof(Edje_Calc_Params_Type_Common));
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
_edje_calc_params_need_type_text(Edje_Calc_Params *p)
|
||||||
|
{
|
||||||
|
if (p->type.text) return;
|
||||||
|
p->type.text = calloc(1, sizeof(Edje_Calc_Params_Type_Text));
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
_edje_calc_params_need_type_node(Edje_Calc_Params *p)
|
||||||
|
{
|
||||||
|
if (p->type.node) return;
|
||||||
|
p->type.node = calloc(1, sizeof(Edje_Calc_Params_Type_Node));
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline void
|
||||||
|
_edje_calc_params_need_ext(Edje_Calc_Params *p)
|
||||||
|
{
|
||||||
|
if (p->ext) return;
|
||||||
|
p->ext = calloc(1, sizeof(Edje_Calc_Params_Ext));
|
||||||
|
if (!p->ext) return;
|
||||||
|
#ifdef EDJE_CALC_CACHE
|
||||||
|
p->ext->map = eina_cow_alloc(_edje_calc_params_map_cow);
|
||||||
|
# ifdef HAVE_EPHYSICS
|
||||||
|
p->ext->physics = eina_cow_alloc(_edje_calc_params_physics_cow);
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
void _edje_calc_params_clear(Edje_Calc_Params *p);
|
||||||
void _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);
|
void _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);
|
||||||
|
|
||||||
/** Find the description of the part by state name and state value.
|
/** Find the description of the part by state name and state value.
|
||||||
|
|
|
@ -681,17 +681,12 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
|
||||||
|
|
||||||
tmp = calloc(1, sizeof(Edje_Calc_Params));
|
tmp = calloc(1, sizeof(Edje_Calc_Params));
|
||||||
if (!tmp) goto low_mem_current;
|
if (!tmp) goto low_mem_current;
|
||||||
tmp->map = eina_cow_alloc(_edje_calc_params_map_cow);
|
|
||||||
#ifdef HAVE_EPHYSICS
|
|
||||||
tmp->physics = eina_cow_alloc(_edje_calc_params_physics_cow);
|
|
||||||
#endif
|
|
||||||
_edje_part_recalc(ed, rp, FLAG_XY, tmp);
|
_edje_part_recalc(ed, rp, FLAG_XY, tmp);
|
||||||
|
|
||||||
if (rp->current)
|
if (rp->current)
|
||||||
{
|
{
|
||||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map);
|
#ifdef EDJE_CALC_CACHE
|
||||||
#ifdef HAVE_EPHYSICS
|
_edje_calc_params_clear(rp->current);
|
||||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
|
|
||||||
#endif
|
#endif
|
||||||
free(rp->current);
|
free(rp->current);
|
||||||
}
|
}
|
||||||
|
@ -702,9 +697,8 @@ _edje_program_run(Edje *ed, Edje_Program *pr, Eina_Bool force, const char *ssig,
|
||||||
low_mem_current:
|
low_mem_current:
|
||||||
if (rp->current)
|
if (rp->current)
|
||||||
{
|
{
|
||||||
eina_cow_free(_edje_calc_params_map_cow, (const Eina_Cow_Data **)&rp->current->map);
|
#ifdef EDJE_CALC_CACHE
|
||||||
#ifdef HAVE_EPHYSICS
|
_edje_calc_params_clear(rp->current);
|
||||||
eina_cow_free(_edje_calc_params_physics_cow, (const Eina_Cow_Data **)&rp->current->physics);
|
|
||||||
#endif
|
#endif
|
||||||
free(rp->current);
|
free(rp->current);
|
||||||
}
|
}
|
||||||
|
|
|
@ -130,12 +130,13 @@ _edje_text_fit_x(Edje *ed, Edje_Real_Part *ep,
|
||||||
*free_text = 0;
|
*free_text = 0;
|
||||||
if (sw <= 1) return "";
|
if (sw <= 1) return "";
|
||||||
|
|
||||||
if ((params->type.text.ellipsis < 0) || (chosen_desc->text.min_x))
|
_edje_calc_params_need_type_text(params);
|
||||||
|
if ((params->type.text->ellipsis < 0) || (chosen_desc->text.min_x))
|
||||||
return text;
|
return text;
|
||||||
|
|
||||||
if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
|
if (ep->part->scale) evas_object_scale_set(ep->object, TO_DOUBLE(sc));
|
||||||
|
|
||||||
evas_obj_text_ellipsis_set(ep->object, params->type.text.ellipsis);
|
evas_obj_text_ellipsis_set(ep->object, params->type.text->ellipsis);
|
||||||
efl_text_properties_font_set(ep->object, font, size);
|
efl_text_properties_font_set(ep->object, font, size);
|
||||||
efl_text_set(ep->object, text);
|
efl_text_set(ep->object, text);
|
||||||
efl_gfx_size_set(ep->object, sw, sh);
|
efl_gfx_size_set(ep->object, sw, sh);
|
||||||
|
@ -293,8 +294,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
sw = TO_INT(params->eval.w);
|
sw = TO_INT(params->eval.w);
|
||||||
sh = TO_INT(params->eval.h);
|
sh = TO_INT(params->eval.h);
|
||||||
|
|
||||||
if (params->type.text.size)
|
_edje_calc_params_need_type_text(params);
|
||||||
size = params->type.text.size;
|
if (params->type.text->size)
|
||||||
|
size = params->type.text->size;
|
||||||
if (!text) text = "";
|
if (!text) text = "";
|
||||||
|
|
||||||
if ((text == ep->typedata.text->cache.in_str)
|
if ((text == ep->typedata.text->cache.in_str)
|
||||||
|
@ -309,9 +311,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
(ep->typedata.text->cache.in_h == sh) &&
|
(ep->typedata.text->cache.in_h == sh) &&
|
||||||
(ep->typedata.text->cache.in_str) &&
|
(ep->typedata.text->cache.in_str) &&
|
||||||
same_text &&
|
same_text &&
|
||||||
(ep->typedata.text->cache.align_x == params->type.text.align.x) &&
|
(ep->typedata.text->cache.align_x == params->type.text->align.x) &&
|
||||||
(ep->typedata.text->cache.align_y == params->type.text.align.y) &&
|
(ep->typedata.text->cache.align_y == params->type.text->align.y) &&
|
||||||
(ep->typedata.text->cache.ellipsis == params->type.text.ellipsis) &&
|
(ep->typedata.text->cache.ellipsis == params->type.text->ellipsis) &&
|
||||||
(ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
|
(ep->typedata.text->cache.fit_x == chosen_desc->text.fit_x) &&
|
||||||
(ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
|
(ep->typedata.text->cache.fit_y == chosen_desc->text.fit_y) &&
|
||||||
(ep->typedata.text->cache.in_font == font))
|
(ep->typedata.text->cache.in_font == font))
|
||||||
|
@ -465,7 +467,7 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
else if ((ed->file->version >= 3) && (ed->file->minor >= 6))
|
else if ((ed->file->version >= 3) && (ed->file->minor >= 6))
|
||||||
{
|
{
|
||||||
evas_object_text_ellipsis_set(ep->object,
|
evas_object_text_ellipsis_set(ep->object,
|
||||||
params->type.text.ellipsis);
|
params->type.text->ellipsis);
|
||||||
}
|
}
|
||||||
|
|
||||||
eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
|
eina_stringshare_replace(&ep->typedata.text->cache.out_str, text);
|
||||||
|
@ -473,9 +475,9 @@ _edje_text_recalc_apply(Edje *ed, Edje_Real_Part *ep,
|
||||||
ep->typedata.text->cache.in_h = sh;
|
ep->typedata.text->cache.in_h = sh;
|
||||||
ep->typedata.text->cache.in_font = font;
|
ep->typedata.text->cache.in_font = font;
|
||||||
ep->typedata.text->cache.out_size = size;
|
ep->typedata.text->cache.out_size = size;
|
||||||
ep->typedata.text->cache.align_x = params->type.text.align.x;
|
ep->typedata.text->cache.align_x = params->type.text->align.x;
|
||||||
ep->typedata.text->cache.align_y = params->type.text.align.y;
|
ep->typedata.text->cache.align_y = params->type.text->align.y;
|
||||||
ep->typedata.text->cache.ellipsis = params->type.text.ellipsis;
|
ep->typedata.text->cache.ellipsis = params->type.text->ellipsis;
|
||||||
ep->typedata.text->cache.fit_x = chosen_desc->text.fit_x;
|
ep->typedata.text->cache.fit_x = chosen_desc->text.fit_x;
|
||||||
ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y;
|
ep->typedata.text->cache.fit_y = chosen_desc->text.fit_y;
|
||||||
arrange_text:
|
arrange_text:
|
||||||
|
@ -492,7 +494,7 @@ arrange_text:
|
||||||
/* Handle alignment */
|
/* Handle alignment */
|
||||||
{
|
{
|
||||||
FLOAT_T align_x;
|
FLOAT_T align_x;
|
||||||
if (params->type.text.align.x < FROM_INT(0))
|
if (params->type.text->align.x < FROM_INT(0))
|
||||||
{
|
{
|
||||||
if (evas_object_text_direction_get(ep->object) ==
|
if (evas_object_text_direction_get(ep->object) ==
|
||||||
EVAS_BIDI_DIRECTION_RTL)
|
EVAS_BIDI_DIRECTION_RTL)
|
||||||
|
@ -506,10 +508,10 @@ arrange_text:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
align_x = params->type.text.align.x;
|
align_x = params->type.text->align.x;
|
||||||
}
|
}
|
||||||
ep->typedata.text->offset.x = TO_INT(SCALE(align_x, (sw - tw)));
|
ep->typedata.text->offset.x = TO_INT(SCALE(align_x, (sw - tw)));
|
||||||
ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text.align.y, (sh - th)));
|
ep->typedata.text->offset.y = TO_INT(SCALE(params->type.text->align.y, (sh - th)));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!calc_only)
|
if (!calc_only)
|
||||||
|
@ -540,73 +542,73 @@ arrange_text:
|
||||||
case EDJE_TEXT_EFFECT_OUTLINE:
|
case EDJE_TEXT_EFFECT_OUTLINE:
|
||||||
style = EVAS_TEXT_STYLE_OUTLINE;
|
style = EVAS_TEXT_STYLE_OUTLINE;
|
||||||
evas_object_text_outline_color_set(ep->object,
|
evas_object_text_outline_color_set(ep->object,
|
||||||
(params->type.text.color2.r * params->type.text.color2.a) / 255,
|
(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.g * params->type.text->color2.a) / 255,
|
||||||
(params->type.text.color2.b * params->type.text.color2.a) / 255,
|
(params->type.text->color2.b * params->type.text->color2.a) / 255,
|
||||||
params->type.text.color2.a);
|
params->type.text->color2.a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_SOFT_OUTLINE:
|
case EDJE_TEXT_EFFECT_SOFT_OUTLINE:
|
||||||
style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
|
style = EVAS_TEXT_STYLE_SOFT_OUTLINE;
|
||||||
evas_object_text_outline_color_set(ep->object,
|
evas_object_text_outline_color_set(ep->object,
|
||||||
(params->type.text.color2.r * params->type.text.color2.a) / 255,
|
(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.g * params->type.text->color2.a) / 255,
|
||||||
(params->type.text.color2.b * params->type.text.color2.a) / 255,
|
(params->type.text->color2.b * params->type.text->color2.a) / 255,
|
||||||
params->type.text.color2.a);
|
params->type.text->color2.a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_SHADOW:
|
case EDJE_TEXT_EFFECT_SHADOW:
|
||||||
style = EVAS_TEXT_STYLE_SHADOW;
|
style = EVAS_TEXT_STYLE_SHADOW;
|
||||||
evas_object_text_shadow_color_set(ep->object,
|
evas_object_text_shadow_color_set(ep->object,
|
||||||
(params->type.text.color3.r * params->type.text.color3.a) / 255,
|
(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.g * params->type.text->color3.a) / 255,
|
||||||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
(params->type.text->color3.b * params->type.text->color3.a) / 255,
|
||||||
params->type.text.color3.a);
|
params->type.text->color3.a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_SOFT_SHADOW:
|
case EDJE_TEXT_EFFECT_SOFT_SHADOW:
|
||||||
style = EVAS_TEXT_STYLE_SOFT_SHADOW;
|
style = EVAS_TEXT_STYLE_SOFT_SHADOW;
|
||||||
evas_object_text_shadow_color_set(ep->object,
|
evas_object_text_shadow_color_set(ep->object,
|
||||||
(params->type.text.color3.r * params->type.text.color3.a) / 255,
|
(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.g * params->type.text->color3.a) / 255,
|
||||||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
(params->type.text->color3.b * params->type.text->color3.a) / 255,
|
||||||
params->type.text.color3.a);
|
params->type.text->color3.a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
|
case EDJE_TEXT_EFFECT_OUTLINE_SHADOW:
|
||||||
style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
|
style = EVAS_TEXT_STYLE_OUTLINE_SHADOW;
|
||||||
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);
|
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);
|
||||||
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);
|
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);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
|
case EDJE_TEXT_EFFECT_OUTLINE_SOFT_SHADOW:
|
||||||
style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
|
style = EVAS_TEXT_STYLE_OUTLINE_SOFT_SHADOW;
|
||||||
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);
|
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);
|
||||||
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);
|
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);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_FAR_SHADOW:
|
case EDJE_TEXT_EFFECT_FAR_SHADOW:
|
||||||
style = EVAS_TEXT_STYLE_FAR_SHADOW;
|
style = EVAS_TEXT_STYLE_FAR_SHADOW;
|
||||||
evas_object_text_shadow_color_set(ep->object,
|
evas_object_text_shadow_color_set(ep->object,
|
||||||
(params->type.text.color3.r * params->type.text.color3.a) / 255,
|
(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.g * params->type.text->color3.a) / 255,
|
||||||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
(params->type.text->color3.b * params->type.text->color3.a) / 255,
|
||||||
params->type.text.color3.a);
|
params->type.text->color3.a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW:
|
case EDJE_TEXT_EFFECT_FAR_SOFT_SHADOW:
|
||||||
style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
|
style = EVAS_TEXT_STYLE_FAR_SOFT_SHADOW;
|
||||||
evas_object_text_shadow_color_set(ep->object,
|
evas_object_text_shadow_color_set(ep->object,
|
||||||
(params->type.text.color3.r * params->type.text.color3.a) / 255,
|
(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.g * params->type.text->color3.a) / 255,
|
||||||
(params->type.text.color3.b * params->type.text.color3.a) / 255,
|
(params->type.text->color3.b * params->type.text->color3.a) / 255,
|
||||||
params->type.text.color3.a);
|
params->type.text->color3.a);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EDJE_TEXT_EFFECT_GLOW:
|
case EDJE_TEXT_EFFECT_GLOW:
|
||||||
style = EVAS_TEXT_STYLE_GLOW;
|
style = EVAS_TEXT_STYLE_GLOW;
|
||||||
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);
|
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);
|
||||||
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);
|
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);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue