evas: reduce potential memory hole in Evas_Object_Protected_State.

The main difference between 1.12 and 1.13 memory foot print is actually
related to this two pointer to mask. I am wondering if there is not an
issue here also has we do have a duplicated pointer. We have prev_mask
and mask in both cur and prev state of an Evas_Object, but only mask
and prev_mask from the cur state seems to be accessed.

If we can remove two pointers from those state, we should have a decent
win in expedite benchmark. Hopefully 300KB to win there (Close to half
the additional cost in memory).
This commit is contained in:
Cedric BAIL 2015-01-20 18:27:59 +01:00
parent 201df16d67
commit c25ba993f6
2 changed files with 3 additions and 2 deletions

View File

@ -28,7 +28,7 @@ static const Evas_Object_Map_Data default_map = {
};
static const Evas_Object_Protected_State default_state = {
NULL, { 0, 0, 0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, NULL, EINA_FALSE, EINA_FALSE } },
{ { NULL, NULL, 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } },
{ 255, 255, 255, 255 },
1.0, 0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
};

View File

@ -908,9 +908,10 @@ struct _Evas_Object_Protected_State
Evas_Coord_Rectangle geometry;
struct {
struct {
const Evas_Object_Protected_Data *mask, *prev_mask;
Evas_Coord x, y, w, h;
unsigned char r, g, b, a;
const Evas_Object_Protected_Data *mask, *prev_mask;
Eina_Bool visible : 1;
Eina_Bool dirty : 1;
} clip;