forked from enlightenment/efl
evas render - get scope data less in phase 1 where obj data passed
in much of phase1 we already know the evas object protected data ptr, so dont scope data get it or even pass the eo obj id around as we can get it from obj->object
This commit is contained in:
parent
a4aac60a67
commit
26189dc9a4
|
@ -714,7 +714,7 @@ _evas_render_phase1_object_ctx_render_cache_append(Phase1_Context *ctx,
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool restack,
|
Eina_Bool restack,
|
||||||
Eina_Bool mapped_parent,
|
Eina_Bool mapped_parent,
|
||||||
Eina_Bool src_changed,
|
Eina_Bool src_changed,
|
||||||
|
@ -745,7 +745,6 @@ _evas_render_phase1_object_map_clipper_fix(Evas_Object *eo_obj,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_render_phase1_object_mapped(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_mapped(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
|
||||||
Evas_Object_Protected_Data *obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool src_changed,
|
Eina_Bool src_changed,
|
||||||
Eina_Bool hmap,
|
Eina_Bool hmap,
|
||||||
|
@ -754,6 +753,7 @@ _evas_render_phase1_object_mapped(Phase1_Context *p1ctx,
|
||||||
int level)
|
int level)
|
||||||
{
|
{
|
||||||
Evas_Object_Protected_Data *obj2;
|
Evas_Object_Protected_Data *obj2;
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
|
|
||||||
RD(level, " obj mapped\n");
|
RD(level, " obj mapped\n");
|
||||||
if (!hmap && obj->cur->clipper)
|
if (!hmap && obj->cur->clipper)
|
||||||
|
@ -778,18 +778,19 @@ _evas_render_phase1_object_mapped(Phase1_Context *p1ctx,
|
||||||
if (obj_changed) evas_object_smart_render_cache_clear(eo_obj);
|
if (obj_changed) evas_object_smart_render_cache_clear(eo_obj);
|
||||||
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
|
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_process(p1ctx, obj2->object, obj->restack,
|
_evas_render_phase1_object_process(p1ctx, obj2, obj->restack,
|
||||||
EINA_TRUE, src_changed, level + 1);
|
EINA_TRUE, src_changed, level + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_render_phase1_object_mapped_had_restack(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_mapped_had_restack(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
|
||||||
Evas_Object_Protected_Data *obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool map,
|
Eina_Bool map,
|
||||||
Eina_Bool obj_changed)
|
Eina_Bool obj_changed)
|
||||||
{
|
{
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
|
|
||||||
RD(level, " had map - restack objs\n");
|
RD(level, " had map - restack objs\n");
|
||||||
_evas_render_prev_cur_clip_cache_add(p1ctx->e, obj);
|
_evas_render_prev_cur_clip_cache_add(p1ctx->e, obj);
|
||||||
if (obj_changed)
|
if (obj_changed)
|
||||||
|
@ -815,7 +816,6 @@ _evas_render_phase1_object_mapped_had_restack(Phase1_Context *p1ctx,
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
|
||||||
Evas_Object_Protected_Data *obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool mapped_parent,
|
Eina_Bool mapped_parent,
|
||||||
Eina_Bool obj_changed,
|
Eina_Bool obj_changed,
|
||||||
|
@ -826,6 +826,7 @@ _evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
||||||
Evas_Object_Protected_Data *obj2;
|
Evas_Object_Protected_Data *obj2;
|
||||||
Render_Cache *rc = NULL;
|
Render_Cache *rc = NULL;
|
||||||
void *p_del_redir;
|
void *p_del_redir;
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
|
|
||||||
RD(level, " changed + smart - render ok\n");
|
RD(level, " changed + smart - render ok\n");
|
||||||
OBJ_ARRAY_PUSH(p1ctx->render_objects, obj);
|
OBJ_ARRAY_PUSH(p1ctx->render_objects, obj);
|
||||||
|
@ -838,8 +839,7 @@ _evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
||||||
evas_object_smart_render_cache_clear(eo_obj);
|
evas_object_smart_render_cache_clear(eo_obj);
|
||||||
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
|
EINA_INLIST_FOREACH(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_process(p1ctx, obj2->object,
|
_evas_render_phase1_object_process(p1ctx, obj2, obj->restack,
|
||||||
obj->restack,
|
|
||||||
mapped_parent, src_changed,
|
mapped_parent, src_changed,
|
||||||
level + 1);
|
level + 1);
|
||||||
}
|
}
|
||||||
|
@ -865,7 +865,7 @@ _evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
||||||
EINA_INLIST_FOREACH
|
EINA_INLIST_FOREACH
|
||||||
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_process(ctx, obj2->object,
|
_evas_render_phase1_object_process(ctx, obj2,
|
||||||
obj->restack,
|
obj->restack,
|
||||||
mapped_parent,
|
mapped_parent,
|
||||||
src_changed,
|
src_changed,
|
||||||
|
@ -882,11 +882,9 @@ _evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
||||||
EINA_INLIST_FOREACH
|
EINA_INLIST_FOREACH
|
||||||
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_process(ctx, obj2->object,
|
_evas_render_phase1_object_process(ctx, obj2, obj->restack,
|
||||||
obj->restack,
|
|
||||||
mapped_parent,
|
mapped_parent,
|
||||||
src_changed,
|
src_changed, level + 1);
|
||||||
level + 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -895,7 +893,6 @@ _evas_render_phase1_object_changed_smart(Phase1_Context *p1ctx,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_render_phase1_object_changed_normal(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_changed_normal(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
|
||||||
Evas_Object_Protected_Data *obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool is_active,
|
Eina_Bool is_active,
|
||||||
int level
|
int level
|
||||||
|
@ -904,6 +901,8 @@ _evas_render_phase1_object_changed_normal(Phase1_Context *p1ctx,
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
|
|
||||||
if ((!obj->clip.clipees) && _evas_render_is_relevant(eo_obj, obj))
|
if ((!obj->clip.clipees) && _evas_render_is_relevant(eo_obj, obj))
|
||||||
{
|
{
|
||||||
if (EINA_LIKELY(is_active))
|
if (EINA_LIKELY(is_active))
|
||||||
|
@ -949,7 +948,6 @@ _evas_render_phase1_object_changed_normal(Phase1_Context *p1ctx,
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_render_phase1_object_no_changed_smart(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_no_changed_smart(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
|
||||||
Evas_Object_Protected_Data *obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool restack,
|
Eina_Bool restack,
|
||||||
Eina_Bool mapped_parent,
|
Eina_Bool mapped_parent,
|
||||||
|
@ -961,6 +959,7 @@ _evas_render_phase1_object_no_changed_smart(Phase1_Context *p1ctx,
|
||||||
Phase1_Context tmpctx;
|
Phase1_Context tmpctx;
|
||||||
Render_Cache *rc = NULL;
|
Render_Cache *rc = NULL;
|
||||||
void *p_del_redir;
|
void *p_del_redir;
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
|
|
||||||
RD(level, " smart + visible/was visible + not clip\n");
|
RD(level, " smart + visible/was visible + not clip\n");
|
||||||
OBJ_ARRAY_PUSH(p1ctx->render_objects, obj);
|
OBJ_ARRAY_PUSH(p1ctx->render_objects, obj);
|
||||||
|
@ -981,12 +980,9 @@ _evas_render_phase1_object_no_changed_smart(Phase1_Context *p1ctx,
|
||||||
EINA_INLIST_FOREACH
|
EINA_INLIST_FOREACH
|
||||||
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_process(ctx,
|
_evas_render_phase1_object_process(ctx, obj2, restack,
|
||||||
obj2->object,
|
|
||||||
restack,
|
|
||||||
mapped_parent,
|
mapped_parent,
|
||||||
src_changed,
|
src_changed, level + 1);
|
||||||
level + 1);
|
|
||||||
}
|
}
|
||||||
p1ctx->redraw_all = ctx->redraw_all;
|
p1ctx->redraw_all = ctx->redraw_all;
|
||||||
p1ctx->e->update_del_redirect_array = p_del_redir;
|
p1ctx->e->update_del_redirect_array = p_del_redir;
|
||||||
|
@ -999,19 +995,15 @@ _evas_render_phase1_object_no_changed_smart(Phase1_Context *p1ctx,
|
||||||
EINA_INLIST_FOREACH
|
EINA_INLIST_FOREACH
|
||||||
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
(evas_object_smart_members_get_direct(eo_obj), obj2)
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_process(ctx,
|
_evas_render_phase1_object_process(ctx, obj2, restack,
|
||||||
obj2->object,
|
|
||||||
restack,
|
|
||||||
mapped_parent,
|
mapped_parent,
|
||||||
src_changed,
|
src_changed, level + 1);
|
||||||
level + 1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_evas_render_phase1_object_no_changed_normal(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_no_changed_normal(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
|
||||||
Evas_Object_Protected_Data *obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
int level
|
int level
|
||||||
#ifndef REND_DBG
|
#ifndef REND_DBG
|
||||||
|
@ -1019,6 +1011,8 @@ _evas_render_phase1_object_no_changed_normal(Phase1_Context *p1ctx,
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
|
|
||||||
if (evas_object_is_opaque(eo_obj, obj) &&
|
if (evas_object_is_opaque(eo_obj, obj) &&
|
||||||
evas_object_is_visible(eo_obj, obj))
|
evas_object_is_visible(eo_obj, obj))
|
||||||
{
|
{
|
||||||
|
@ -1040,7 +1034,7 @@ _evas_render_phase1_object_no_changed_normal(Phase1_Context *p1ctx,
|
||||||
|
|
||||||
static Eina_Bool
|
static Eina_Bool
|
||||||
_evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
_evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
||||||
Evas_Object *eo_obj,
|
Evas_Object_Protected_Data *obj,
|
||||||
Eina_Bool restack,
|
Eina_Bool restack,
|
||||||
Eina_Bool mapped_parent,
|
Eina_Bool mapped_parent,
|
||||||
Eina_Bool src_changed,
|
Eina_Bool src_changed,
|
||||||
|
@ -1048,8 +1042,7 @@ _evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
||||||
{
|
{
|
||||||
Eina_Bool clean_them = EINA_FALSE;
|
Eina_Bool clean_them = EINA_FALSE;
|
||||||
Eina_Bool map, hmap, can_map, map_not_can_map, obj_changed, is_active;
|
Eina_Bool map, hmap, can_map, map_not_can_map, obj_changed, is_active;
|
||||||
|
Evas_Object *eo_obj = obj->object;
|
||||||
Evas_Object_Protected_Data *obj = efl_data_scope_get(eo_obj, EFL_CANVAS_OBJECT_CLASS);
|
|
||||||
|
|
||||||
obj->rect_del = EINA_FALSE;
|
obj->rect_del = EINA_FALSE;
|
||||||
obj->render_pre = EINA_FALSE;
|
obj->render_pre = EINA_FALSE;
|
||||||
|
@ -1116,28 +1109,25 @@ _evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
||||||
|
|
||||||
if (EINA_UNLIKELY(map_not_can_map))
|
if (EINA_UNLIKELY(map_not_can_map))
|
||||||
{
|
{
|
||||||
_evas_render_phase1_object_mapped(p1ctx, eo_obj, obj, src_changed,
|
_evas_render_phase1_object_mapped(p1ctx, obj, src_changed, hmap,
|
||||||
hmap, is_active, obj_changed,
|
is_active, obj_changed, level);
|
||||||
level);
|
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
else if (EINA_UNLIKELY(hmap && !can_map))
|
else if (EINA_UNLIKELY(hmap && !can_map))
|
||||||
_evas_render_phase1_object_mapped_had_restack(p1ctx, eo_obj, obj,
|
_evas_render_phase1_object_mapped_had_restack(p1ctx, obj, map,
|
||||||
map, obj_changed);
|
obj_changed);
|
||||||
|
|
||||||
/* handle normal rendering. this object knows how to handle maps */
|
/* handle normal rendering. this object knows how to handle maps */
|
||||||
if (obj_changed)
|
if (obj_changed)
|
||||||
{
|
{
|
||||||
if (obj->is_smart)
|
if (obj->is_smart)
|
||||||
src_changed =
|
src_changed =
|
||||||
_evas_render_phase1_object_changed_smart(p1ctx, eo_obj, obj,
|
_evas_render_phase1_object_changed_smart(p1ctx, obj, mapped_parent,
|
||||||
mapped_parent,
|
obj_changed, src_changed,
|
||||||
obj_changed,
|
is_active, level);
|
||||||
src_changed, is_active,
|
|
||||||
level);
|
|
||||||
else /* non smart object */
|
else /* non smart object */
|
||||||
_evas_render_phase1_object_changed_normal(p1ctx, eo_obj, obj,
|
_evas_render_phase1_object_changed_normal(p1ctx, obj, is_active,
|
||||||
is_active, level);
|
level);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -1153,14 +1143,11 @@ _evas_render_phase1_object_process(Phase1_Context *p1ctx,
|
||||||
(!obj->prev->have_clipees))))
|
(!obj->prev->have_clipees))))
|
||||||
{
|
{
|
||||||
if (obj->is_smart)
|
if (obj->is_smart)
|
||||||
_evas_render_phase1_object_no_changed_smart(p1ctx, eo_obj,
|
_evas_render_phase1_object_no_changed_smart(p1ctx, obj, restack,
|
||||||
obj, restack,
|
|
||||||
mapped_parent,
|
mapped_parent,
|
||||||
src_changed,
|
src_changed, level);
|
||||||
level);
|
|
||||||
else /* not smart */
|
else /* not smart */
|
||||||
_evas_render_phase1_object_no_changed_normal(p1ctx, eo_obj,
|
_evas_render_phase1_object_no_changed_normal(p1ctx, obj, level);
|
||||||
obj, level);
|
|
||||||
}
|
}
|
||||||
else if (EINA_UNLIKELY(is_active &&
|
else if (EINA_UNLIKELY(is_active &&
|
||||||
_evas_render_object_is_mask(obj) &&
|
_evas_render_object_is_mask(obj) &&
|
||||||
|
@ -1207,7 +1194,7 @@ _evas_render_phase1_process(Phase1_Context *p1ctx)
|
||||||
EINA_INLIST_FOREACH(lay->objects, obj)
|
EINA_INLIST_FOREACH(lay->objects, obj)
|
||||||
{
|
{
|
||||||
clean_them |= _evas_render_phase1_object_process
|
clean_them |= _evas_render_phase1_object_process
|
||||||
(p1ctx, obj->object, EINA_FALSE, EINA_FALSE, EINA_FALSE, 2);
|
(p1ctx, obj, EINA_FALSE, EINA_FALSE, EINA_FALSE, 2);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
RD(0, " ---]\n");
|
RD(0, " ---]\n");
|
||||||
|
|
Loading…
Reference in New Issue