forked from enlightenment/efl
evas: move make update to be outside of the reused code for rendering sub objects.
This commit is contained in:
parent
46082eb13d
commit
941d75d24d
|
@ -2138,36 +2138,17 @@ evas_render_updates_internal_loop(Evas *eo_e, Evas_Public_Data *e,
|
||||||
int cx, int cy, int cw, int ch,
|
int cx, int cy, int cw, int ch,
|
||||||
int fx, int fy,
|
int fx, int fy,
|
||||||
Eina_Bool alpha,
|
Eina_Bool alpha,
|
||||||
Eina_Bool make_updates,
|
|
||||||
Eina_Bool do_async,
|
Eina_Bool do_async,
|
||||||
unsigned int *offset)
|
unsigned int *offset)
|
||||||
{
|
{
|
||||||
Evas_Object *eo_obj;
|
Evas_Object *eo_obj;
|
||||||
Evas_Object_Protected_Data *obj;
|
Evas_Object_Protected_Data *obj;
|
||||||
Render_Updates *ru;
|
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
unsigned int i, j;
|
unsigned int i, j;
|
||||||
Eina_Bool clean_them = EINA_FALSE;
|
Eina_Bool clean_them = EINA_FALSE;
|
||||||
|
|
||||||
eina_evlog("+render_setup", eo_e, 0.0, NULL);
|
eina_evlog("+render_setup", eo_e, 0.0, NULL);
|
||||||
RD(0, " [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh);
|
RD(0, " [--- UPDATE %i %i %ix%i\n", ux, uy, uw, uh);
|
||||||
if (do_async)
|
|
||||||
{
|
|
||||||
ru = malloc(sizeof(*ru));
|
|
||||||
ru->surface = surface;
|
|
||||||
NEW_RECT(ru->area, ux, uy, uw, uh);
|
|
||||||
e->render.updates = eina_list_append(e->render.updates, ru);
|
|
||||||
evas_cache_image_ref(surface);
|
|
||||||
}
|
|
||||||
else if (make_updates)
|
|
||||||
{
|
|
||||||
Eina_Rectangle *rect;
|
|
||||||
|
|
||||||
NEW_RECT(rect, ux, uy, uw, uh);
|
|
||||||
if (rect)
|
|
||||||
e->render.updates = eina_list_append(e->render.updates,
|
|
||||||
rect);
|
|
||||||
}
|
|
||||||
|
|
||||||
off_x = cx - ux;
|
off_x = cx - ux;
|
||||||
off_y = cy - uy;
|
off_y = cy - uy;
|
||||||
|
@ -2569,6 +2550,7 @@ evas_render_updates_internal(Evas *eo_e,
|
||||||
eina_evlog("+render_phase6", eo_e, 0.0, NULL);
|
eina_evlog("+render_phase6", eo_e, 0.0, NULL);
|
||||||
if (do_draw)
|
if (do_draw)
|
||||||
{
|
{
|
||||||
|
Render_Updates *ru;
|
||||||
void *surface;
|
void *surface;
|
||||||
int ux, uy, uw, uh;
|
int ux, uy, uw, uh;
|
||||||
int cx, cy, cw, ch;
|
int cx, cy, cw, ch;
|
||||||
|
@ -2621,7 +2603,7 @@ evas_render_updates_internal(Evas *eo_e,
|
||||||
ur.x, ur.y, ur.w, ur.h,
|
ur.x, ur.y, ur.w, ur.h,
|
||||||
cr.x, cr.y, cr.w, cr.h,
|
cr.x, cr.y, cr.w, cr.h,
|
||||||
fx, fy, alpha,
|
fx, fy, alpha,
|
||||||
make_updates, do_async,
|
do_async,
|
||||||
&offset);
|
&offset);
|
||||||
e->engine.func->context_free(e->engine.data.output, ctx);
|
e->engine.func->context_free(e->engine.data.output, ctx);
|
||||||
|
|
||||||
|
@ -2634,12 +2616,30 @@ evas_render_updates_internal(Evas *eo_e,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* phase 6.2 render all the object on the target surface */
|
/* phase 6.2 render all the object on the target surface */
|
||||||
|
if (do_async)
|
||||||
|
{
|
||||||
|
ru = malloc(sizeof(*ru));
|
||||||
|
ru->surface = surface;
|
||||||
|
NEW_RECT(ru->area, ux, uy, uw, uh);
|
||||||
|
e->render.updates = eina_list_append(e->render.updates, ru);
|
||||||
|
evas_cache_image_ref(surface);
|
||||||
|
}
|
||||||
|
else if (make_updates)
|
||||||
|
{
|
||||||
|
Eina_Rectangle *rect;
|
||||||
|
|
||||||
|
NEW_RECT(rect, ux, uy, uw, uh);
|
||||||
|
if (rect)
|
||||||
|
e->render.updates = eina_list_append(e->render.updates,
|
||||||
|
rect);
|
||||||
|
}
|
||||||
|
|
||||||
clean_them |= evas_render_updates_internal_loop(eo_e, e, surface, e->engine.data.context,
|
clean_them |= evas_render_updates_internal_loop(eo_e, e, surface, e->engine.data.context,
|
||||||
NULL,
|
NULL,
|
||||||
ux, uy, uw, uh,
|
ux, uy, uw, uh,
|
||||||
cx, cy, cw, ch,
|
cx, cy, cw, ch,
|
||||||
fx, fy, alpha,
|
fx, fy, alpha,
|
||||||
make_updates, do_async,
|
do_async,
|
||||||
&offset);
|
&offset);
|
||||||
|
|
||||||
eina_evlog("+render_push", eo_e, 0.0, NULL);
|
eina_evlog("+render_push", eo_e, 0.0, NULL);
|
||||||
|
|
Loading…
Reference in New Issue