forked from enlightenment/efl
Save 8 bytes from Evas_Object by packing interpolation.color_space.
Interpolation color_space (now ASHV or ARGB) was being used inside a struct with 4 byte alignment. Remove it from the struct and make it a bitfield so can be packed with the other fields. This saves 2 integers, so 8 bytes. SVN revision: 34418
This commit is contained in:
parent
625e124f05
commit
4bc8043a10
|
@ -785,7 +785,7 @@ evas_object_gradient_init(Evas_Object *obj)
|
|||
obj->cur.geometry.h = 0;
|
||||
obj->cur.layer = 0;
|
||||
obj->cur.anti_alias = 1;
|
||||
obj->cur.interpolation.color_space = EVAS_COLOR_SPACE_ARGB;
|
||||
obj->cur.interpolation_color_space = EVAS_COLOR_SPACE_ARGB;
|
||||
obj->cur.render_op = EVAS_RENDER_BLEND;
|
||||
/* set up object-specific settings */
|
||||
obj->prev = obj->cur;
|
||||
|
@ -933,7 +933,7 @@ evas_object_gradient_render_pre(Evas_Object *obj)
|
|||
(obj->cur.cache.clip.b != obj->prev.cache.clip.b) ||
|
||||
(obj->cur.cache.clip.a != obj->prev.cache.clip.a)))
|
||||
{ o->gradient_changed = 1; o->changed = 1; }
|
||||
if (!o->gradient_changed && (obj->cur.interpolation.color_space != obj->prev.interpolation.color_space))
|
||||
if (!o->gradient_changed && (obj->cur.interpolation_color_space != obj->prev.interpolation_color_space))
|
||||
{ o->gradient_changed = 1; o->changed = 1; }
|
||||
if (!o->changed && (obj->cur.render_op != obj->prev.render_op))
|
||||
o->changed = 1;
|
||||
|
@ -973,7 +973,7 @@ evas_object_gradient_render_pre(Evas_Object *obj)
|
|||
obj->cur.cache.clip.b, obj->cur.cache.clip.a);
|
||||
obj->layer->evas->engine.func->context_color_interpolation_set(obj->layer->evas->engine.data.output,
|
||||
obj->layer->evas->engine.data.context,
|
||||
obj->cur.interpolation.color_space);
|
||||
obj->cur.interpolation_color_space);
|
||||
if (o->gradient_changed)
|
||||
obj->layer->evas->engine.func->gradient_render_pre(obj->layer->evas->engine.data.output,
|
||||
obj->layer->evas->engine.data.context,
|
||||
|
|
|
@ -1193,9 +1193,9 @@ evas_object_color_interpolation_set(Evas_Object *obj, int color_space)
|
|||
return;
|
||||
MAGIC_CHECK_END();
|
||||
if (obj->delete_me) return;
|
||||
if (obj->cur.interpolation.color_space == color_space)
|
||||
if (obj->cur.interpolation_color_space == color_space)
|
||||
return;
|
||||
obj->cur.interpolation.color_space = color_space;
|
||||
obj->cur.interpolation_color_space = color_space;
|
||||
evas_object_change(obj);
|
||||
}
|
||||
|
||||
|
@ -1213,7 +1213,7 @@ evas_object_color_interpolation_get(const Evas_Object *obj)
|
|||
return 0;
|
||||
MAGIC_CHECK_END();
|
||||
if (obj->delete_me) return 0;
|
||||
return obj->cur.interpolation.color_space;
|
||||
return obj->cur.interpolation_color_space;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -418,12 +418,10 @@ struct _Evas_Object
|
|||
} color;
|
||||
int layer;
|
||||
Evas_Object *clipper;
|
||||
struct {
|
||||
int color_space;
|
||||
} interpolation;
|
||||
Evas_Bool visible : 1;
|
||||
Evas_Bool have_clipees : 1;
|
||||
Evas_Bool anti_alias : 1;
|
||||
unsigned char interpolation_color_space : 1;
|
||||
Evas_Render_Op render_op : 4;
|
||||
} cur, prev;
|
||||
|
||||
|
|
Loading…
Reference in New Issue