forked from enlightenment/efl
evas - more render2 work - follows smart children now
This commit is contained in:
parent
7a7d3be140
commit
bed30a7eb9
|
@ -223,13 +223,10 @@ _evas_render2_stage_render_do(Evas_Public_Data *e, Eina_Bool do_async EINA_UNUSE
|
|||
void *surface;
|
||||
int ux, uy, uw, uh;
|
||||
int cx, cy, cw, ch;
|
||||
// Evas_Render_Mode render_mode = EVAS_RENDER_MODE_UNDEF;
|
||||
|
||||
// if (!do_async) render_mode = EVAS_RENDER_MODE_SYNC;
|
||||
// else render_mode = EVAS_RENDER_MODE_ASYNC_INIT;// XXX:
|
||||
// XXX: actually render now (either in thread or in mainloop)
|
||||
// XXX:
|
||||
printf("_evas_render2_stage_render_do %p\n", e);
|
||||
printf(" _evas_render2_stage_render_do %p\n", e);
|
||||
while ((surface =
|
||||
e->engine.func->output_redraws_next_update_get
|
||||
(e->engine.data.output,
|
||||
|
@ -243,7 +240,7 @@ _evas_render2_stage_render_do(Evas_Public_Data *e, Eina_Bool do_async EINA_UNUSE
|
|||
e->engine.func->context_color_set
|
||||
(e->engine.data.output, ctx,
|
||||
rand() & 0xff, rand() & 0xff, rand() & 0xff, 0xff);
|
||||
printf("%i %i %i %i\n", cx, cy, cw, ch);
|
||||
printf(" %i %i %i %i\n", cx, cy, cw, ch);
|
||||
e->engine.func->rectangle_draw(e->engine.data.output,
|
||||
ctx, surface,
|
||||
cx, cy, cw, ch,
|
||||
|
@ -254,10 +251,6 @@ _evas_render2_stage_render_do(Evas_Public_Data *e, Eina_Bool do_async EINA_UNUSE
|
|||
NEW_RECT(ru->area, ux, uy, uw, uh);
|
||||
e->render.updates = eina_list_append(e->render.updates, ru);
|
||||
evas_cache_image_ref(surface);
|
||||
// e->engine.func->output_redraws_next_update_push(e->engine.data.output,
|
||||
// surface,
|
||||
// ux, uy, uw, uh,
|
||||
// render_mode);
|
||||
}
|
||||
e->engine.func->output_redraws_clear(e->engine.data.output);
|
||||
}
|
||||
|
@ -287,8 +280,9 @@ static void
|
|||
_evas_render2_th_render(void *data)
|
||||
{
|
||||
Evas_Public_Data *e = data;
|
||||
printf("th rend %p ......................................\n", e);
|
||||
printf(".....................................................%p\n", e);
|
||||
_evas_render2_stage_render_do(e, EINA_TRUE);
|
||||
printf("^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^%p\n", e);
|
||||
}
|
||||
|
||||
// major functions (called from evas_render.c)
|
||||
|
@ -345,13 +339,6 @@ _evas_render2_begin(Eo *eo_e, Eina_Bool make_updates,
|
|||
// if we are not going to be async then do last render stage here
|
||||
if (!do_async) _evas_render2_stage_last(eo_e, make_updates, EINA_FALSE);
|
||||
if (!do_draw) _evas_render2_updates_clean(e);
|
||||
|
||||
e->changed = EINA_FALSE;
|
||||
e->viewport.changed = EINA_FALSE;
|
||||
e->output.changed = EINA_FALSE;
|
||||
e->framespace.changed = EINA_FALSE;
|
||||
e->invalidate = EINA_FALSE;
|
||||
|
||||
evas_module_clean();
|
||||
return EINA_TRUE;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ _obj_basic_process(Evas_Public_Data *e,
|
|||
obj->func->render_pre(eo_obj, obj, obj->private_data);
|
||||
obj->pre_render_done = EINA_TRUE;
|
||||
int i; for (i = 0; i < l; i++) printf(" ");
|
||||
printf("BASIC %p %p\n", e, obj);
|
||||
printf("BASIC %p %p [%10s]\n", e, eo_obj, obj->type);
|
||||
obj->func->render_post(eo_obj, obj, obj->private_data);
|
||||
obj->restack = EINA_FALSE;
|
||||
obj->pre_render_done = EINA_FALSE;
|
||||
|
@ -29,8 +29,10 @@ _obj_process(Evas_Public_Data *e,
|
|||
// process object OR walk through child objects if smart and process those
|
||||
Evas_Object_Protected_Data *obj2;
|
||||
Evas_Object *eo_obj = obj->object;
|
||||
Eina_Inlist *il;
|
||||
|
||||
if (obj->smart.smart)
|
||||
il = evas_object_smart_members_get_direct(eo_obj);
|
||||
if (il)
|
||||
{
|
||||
if (!evas_object_smart_changed_get(eo_obj)) return;
|
||||
obj->rect_del = EINA_FALSE;
|
||||
|
@ -42,11 +44,9 @@ _obj_process(Evas_Public_Data *e,
|
|||
obj->func->render_pre(eo_obj, obj, obj->private_data);
|
||||
obj->pre_render_done = EINA_TRUE;
|
||||
int i; for (i = 0; i < l; i++) printf(" ");
|
||||
printf("SMART %p %p\n", e, obj);
|
||||
printf("SMART %p %p [%10s]\n", e, eo_obj, obj->type);
|
||||
|
||||
EINA_INLIST_FOREACH
|
||||
(evas_object_smart_members_get_direct(obj->object), obj2)
|
||||
_obj_process(e, obj2, l + 1);
|
||||
EINA_INLIST_FOREACH(il, obj2) _obj_process(e, obj2, l + 1);
|
||||
|
||||
obj->func->render_post(eo_obj, obj, obj->private_data);
|
||||
obj->restack = EINA_FALSE;
|
||||
|
@ -67,10 +67,15 @@ _evas_render2_stage_generate_object_updates(Evas_Public_Data *e)
|
|||
Evas_Object_Protected_Data *obj;
|
||||
double t;
|
||||
|
||||
static int num = 0;
|
||||
printf("........... updates # %i\n", num++);
|
||||
t = get_time();
|
||||
EINA_INLIST_FOREACH(e->layers, lay)
|
||||
{
|
||||
EINA_INLIST_FOREACH(lay->objects, obj) _obj_process(e, obj, 0);
|
||||
EINA_INLIST_FOREACH(lay->objects, obj)
|
||||
{
|
||||
_obj_process(e, obj, 0);
|
||||
}
|
||||
}
|
||||
t = get_time() - t;
|
||||
printf("T: update generation: "); out_time(t);
|
||||
|
|
Loading…
Reference in New Issue