evas: remove one useless pointer (-30KB).

This commit is contained in:
Cedric Bail 2013-04-07 14:00:10 +09:00
parent 0cee296fa7
commit f1dfbc4e0e
14 changed files with 58 additions and 58 deletions

View File

@ -24,18 +24,18 @@ evas_object_clip_dirty(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Da
}
void
evas_object_recalc_clippees(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
evas_object_recalc_clippees(Evas_Object_Protected_Data *obj)
{
Eina_List *l;
Evas_Object *data;
if (obj->cur->cache.clip.dirty)
{
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
EINA_LIST_FOREACH(obj->clip.clipees, l, data)
{
Evas_Object_Protected_Data *clipee = eo_data_get(data, EVAS_OBJ_CLASS);
evas_object_recalc_clippees(data, clipee);
evas_object_recalc_clippees(clipee);
}
}
}
@ -47,7 +47,7 @@ evas_object_clippers_was_visible(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pr
{
if (obj->prev->clipper)
{
return evas_object_clippers_is_visible(obj->prev->eo_clipper, obj->prev->clipper);
return evas_object_clippers_is_visible(obj->prev->clipper->object, obj->prev->clipper);
}
return 1;
}
@ -105,7 +105,7 @@ evas_object_child_map_across_mark(Evas_Object *eo_obj, Evas_Object_Protected_Dat
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
if (obj->is_smart)
{
Evas_Object_Protected_Data *obj2;
@ -223,7 +223,7 @@ _clip_set(Eo *eo_obj, void *_pd, va_list *list)
MAGIC_CHECK_END();
clip = eo_data_get(eo_clip, EVAS_OBJ_CLASS);
if (obj->cur->eo_clipper == eo_clip) return;
if (obj->cur->clipper && obj->cur->clipper->object == eo_clip) return;
if (eo_obj == eo_clip)
{
CRIT("Setting clip %p on itself", eo_obj);
@ -281,13 +281,12 @@ _clip_set(Eo *eo_obj, void *_pd, va_list *list)
obj->cur->clipper->cur->geometry.w,
obj->cur->clipper->cur->geometry.h);
}
evas_object_change(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_change(obj->cur->clipper->object, obj->cur->clipper);
evas_object_change(eo_obj, obj);
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->clipper = NULL;
state_write->eo_clipper = NULL;
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
}
@ -303,7 +302,6 @@ _clip_set(Eo *eo_obj, void *_pd, va_list *list)
}
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->eo_clipper = eo_clip;
state_write->clipper = clip;
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
@ -331,7 +329,7 @@ _clip_set(Eo *eo_obj, void *_pd, va_list *list)
evas_object_change(eo_clip, clip);
evas_object_change(eo_obj, obj);
evas_object_clip_dirty(eo_obj, obj);
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
if ((!obj->is_smart) &&
(!((obj->map->cur.map) && (obj->map->cur.usemap))))
{
@ -363,7 +361,11 @@ _clip_get(Eo *eo_obj EINA_UNUSED, void *_pd, va_list *list)
{
Evas_Object **clip = va_arg(*list, Evas_Object **);
const Evas_Object_Protected_Data *obj = _pd;
*clip = obj->cur->eo_clipper;
*clip = NULL;
if (obj->cur->clipper)
*clip = obj->cur->clipper->object;
}
EAPI void
@ -405,18 +407,17 @@ _clip_unset(Eo *eo_obj, void *_pd, va_list *list EINA_UNUSED)
obj->cur->clipper->cur->geometry.w,
obj->cur->clipper->cur->geometry.h);
}
evas_object_change(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_change(obj->cur->clipper->object, obj->cur->clipper);
}
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
{
state_write->clipper = NULL;
state_write->eo_clipper = NULL;
}
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
evas_object_change(eo_obj, obj);
evas_object_clip_dirty(eo_obj, obj);
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
if ((!obj->is_smart) &&
(!((obj->map->cur.map) && (obj->map->cur.usemap))))
{

View File

@ -989,9 +989,8 @@ _canvas_event_thaw(Eo *eo_e, void *_pd, va_list *list EINA_UNUSED)
EINA_INLIST_FOREACH(lay->objects, obj)
{
Evas_Object *eo_obj = obj->object;
evas_object_clip_recalc(eo_obj, obj);
evas_object_recalc_clippees(eo_obj, obj);
evas_object_clip_recalc(obj);
evas_object_recalc_clippees(obj);
}
}

View File

@ -12,7 +12,7 @@ _evas_map_calc_geom_change(Evas_Object *eo_obj)
evas_object_clip_dirty(eo_obj, obj);
if (!(obj->layer->evas->is_frozen))
{
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
if (!obj->is_smart)
{
is = evas_object_is_in_output_rect(eo_obj, obj,

View File

@ -4008,8 +4008,9 @@ evas_object_image_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *ob
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object,
obj->cur->clipper);
}
/* Proxy: Do it early */
if (o->cur->source)

View File

@ -292,8 +292,8 @@ evas_object_line_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object, obj->cur->clipper);
}
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */

View File

@ -31,7 +31,7 @@ static const Evas_Object_Map_Data default_map = {
{ NULL, NULL, 0, 0 }, { NULL, NULL, 0, 0 }, NULL, 0, 0, NULL, NULL
};
static const Evas_Object_Protected_State default_state = {
NULL, NULL, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
NULL, { 0, 0, 0, 0 }, { 0, 0, 0, 0 },
{ { 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } },
{ 255, 255, 255, 255 },
1.0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
@ -880,7 +880,7 @@ _position_set(Eo *eo_obj, void *_pd, va_list *list)
obj->doing.in_move--;
if (!(obj->layer->evas->is_frozen))
{
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
if (!pass)
{
if (!obj->is_smart)
@ -968,7 +968,7 @@ _size_set(Eo *eo_obj, void *_pd, va_list *list)
if (!(obj->layer->evas->is_frozen))
{
/* NB: If this creates glitches on screen then move to above position */
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
// if (obj->func->coords_recalc) obj->func->coords_recalc(eo_obj);
if (!pass)
@ -1539,7 +1539,7 @@ _show(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
if (!(obj->layer->evas->is_frozen))
{
evas_object_clip_across_clippees_check(eo_obj, obj);
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
if ((!evas_event_passes_through(eo_obj, obj)) &&
(!evas_event_freezes_through(eo_obj, obj)) &&
(!evas_object_is_source_invisible(eo_obj, obj)))
@ -1589,7 +1589,7 @@ _hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
if (!(obj->layer->evas->is_frozen))
{
evas_object_clip_across_clippees_check(eo_obj, obj);
evas_object_recalc_clippees(eo_obj, obj);
evas_object_recalc_clippees(obj);
if ((!evas_event_passes_through(eo_obj, obj)) &&
(!evas_event_freezes_through(eo_obj, obj)) &&
(!evas_object_is_source_invisible(eo_obj, obj)))
@ -2139,7 +2139,7 @@ _canvas_object_top_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
(evas_event_passes_through(eo_obj, obj))) continue;
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, 1, 1)) &&
(!obj->clip.clipees))
{
@ -2211,7 +2211,7 @@ _canvas_object_top_in_rectangle_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *li
(evas_event_passes_through(eo_obj, obj))) continue;
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, ww, hh)) &&
(!obj->clip.clipees))
{
@ -2266,7 +2266,7 @@ _canvas_objects_at_xy_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
(evas_event_passes_through(eo_obj, obj))) continue;
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, 1, 1)) &&
(!obj->clip.clipees))
in = eina_list_prepend(in, eo_obj);
@ -2338,7 +2338,7 @@ _canvas_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, void *_pd, va_list *list)
(evas_event_passes_through(eo_obj, obj))) continue;
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, ww, hh)) &&
(!obj->clip.clipees))
in = eina_list_prepend(in, eo_obj);

View File

@ -360,8 +360,8 @@ evas_object_polygon_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object, obj->cur->clipper);
}
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */

View File

@ -153,8 +153,8 @@ evas_object_rectangle_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object, obj->cur->clipper);
}
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */

View File

@ -2208,8 +2208,8 @@ evas_object_text_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object, obj->cur->clipper);
}
/* If object size changed and ellipsis is set */
if (((o->cur.ellipsis >= 0.0 ||

View File

@ -10615,8 +10615,8 @@ evas_object_textblock_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object, obj->cur->clipper);
}
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */

View File

@ -794,8 +794,8 @@ evas_object_textgrid_render_pre(Evas_Object *eo_obj, Evas_Object_Protected_Data
if (obj->cur->clipper)
{
if (obj->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->eo_clipper, obj->cur->clipper);
evas_object_clip_recalc(obj->cur->clipper);
obj->cur->clipper->func->render_pre(obj->cur->clipper->object, obj->cur->clipper);
}
/* now figure what changed and add draw rects */
/* if it just became visible or invisible */

View File

@ -266,14 +266,12 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
RD(" [--- PHASE 1 DIRECT\n");
for (i = 0; i < active_objects->count; i++)
{
Evas_Object *eo_obj;
Evas_Object_Protected_Data *obj = eina_array_data_get(active_objects, i);
eo_obj = obj->object;
if (obj->changed)
{
/* Flag need redraw on proxy too */
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_proxy)
{
Evas_Object_Protected_Data *proxy;
@ -296,7 +294,7 @@ _evas_render_phase1_direct(Evas_Public_Data *e,
if (obj->changed)
{
/* Flag need redraw on proxy too */
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
obj->func->render_pre(eo_obj, obj);
if (obj->proxy->redraw)
_evas_render_prev_cur_clip_cache_add(e, obj);
@ -379,7 +377,7 @@ _evas_render_phase1_object_process(Evas_Public_Data *e, Evas_Object *eo_obj,
if (obj->delete_me != 0) clean_them = EINA_TRUE;
/* build active object list */
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
is_active = evas_object_is_active(eo_obj, obj);
obj->is_active = is_active;
@ -659,7 +657,7 @@ _evas_render_check_pending_objects(Eina_Array *pending_objects, Evas *eo_e EINA_
if (obj->changed_map && _evas_render_has_map(eo_obj, obj))
goto clean_stuff;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
is_active = evas_object_is_active(eo_obj, obj);
if ((!is_active) && (!obj->is_active) && (!obj->render_pre) &&
@ -952,7 +950,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
if ((!proxy_render) && (evas_object_is_source_invisible(eo_obj, obj)))
return clean_them;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
RDI(level);
RD(" { evas_render_mapped(%p, %p, %p, %p, %i, %i, %i, %i)\n", e, obj, context, surface, off_x, off_y, mapped, level);
@ -1163,7 +1161,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
{
int x, y, w, h;
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
x = obj->cur->cache.clip.x;
y = obj->cur->cache.clip.y;
w = obj->cur->cache.clip.w;
@ -1271,7 +1269,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
int x, y, w, h;
if (_evas_render_has_map(eo_obj, obj))
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
x = obj->cur->cache.clip.x + off_x;
y = obj->cur->cache.clip.y + off_y;
@ -1299,7 +1297,7 @@ evas_render_mapped(Evas_Public_Data *e, Evas_Object *eo_obj,
int x, y, w, h;
if (_evas_render_has_map(eo_obj, obj))
evas_object_clip_recalc(eo_obj, obj);
evas_object_clip_recalc(obj);
x = obj->cur->cache.clip.x;
y = obj->cur->cache.clip.y;
w = obj->cur->cache.clip.w;
@ -1362,7 +1360,7 @@ _evas_render_cutout_add(Evas *eo_e, Evas_Object *eo_obj, int off_x, int off_y)
oo->cur->geometry.y,
oo->cur->geometry.w,
oo->cur->geometry.h);
eo_oo = oo->cur->eo_clipper;
eo_oo = oo->cur->clipper->object;
oo = oo->cur->clipper;
}
}

View File

@ -142,7 +142,7 @@ evas_object_clippers_is_visible(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Pro
{
if (obj->cur->clipper)
{
return evas_object_clippers_is_visible(obj->cur->eo_clipper,
return evas_object_clippers_is_visible(obj->cur->clipper->object,
obj->cur->clipper);
}
return 1;
@ -215,13 +215,15 @@ evas_object_coords_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
}
static inline void
evas_object_clip_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
evas_object_clip_recalc(Evas_Object_Protected_Data *obj)
{
Evas_Object_Protected_Data *clipper = NULL;
int cx, cy, cw, ch, cr, cg, cb, ca;
int nx, ny, nw, nh, nr, ng, nb, na;
Eina_Bool cvis, nvis;
Evas_Object *eo_obj;
eo_obj = obj->object;
clipper = obj->cur->clipper;
if ((!obj->cur->cache.clip.dirty) &&
@ -257,7 +259,7 @@ evas_object_clip_recalc(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
{
// this causes problems... hmmm ?????
if (clipper->cur->cache.clip.dirty)
evas_object_clip_recalc(obj->cur->eo_clipper, clipper);
evas_object_clip_recalc(clipper);
// I don't know why this test was here in the first place. As I have
// no issue showing up due to this, I keep it and move color out of it.

View File

@ -534,7 +534,6 @@ struct _Evas_Object_Map_Data
struct _Evas_Object_Protected_State
{
Evas_Object_Protected_Data *clipper;
Evas_Object *eo_clipper;
Evas_Coord_Rectangle geometry;
Evas_Coord_Rectangle bounding_box;
@ -959,7 +958,7 @@ void evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *obj,
void evas_rects_return_difference_rects(Eina_Array *rects, int x, int y, int w, int h, int xx, int yy, int ww, int hh);
void evas_object_clip_dirty(Evas_Object *obj, Evas_Object_Protected_Data *pd);
void evas_object_recalc_clippees(Evas_Object *obj, Evas_Object_Protected_Data *pd);
void evas_object_recalc_clippees(Evas_Object_Protected_Data *pd);
Evas_Layer *evas_layer_new(Evas *e);
void evas_layer_pre_free(Evas_Layer *lay);
void evas_layer_free_objects(Evas_Layer *lay);