resize damage tiler on resize

this fixes render races which occur when damages and resizes happen in quick succession
This commit is contained in:
Mike Blumenkrantz 2014-02-17 16:51:46 -05:00 committed by Iván Briano
parent 14c7e58a29
commit ef360e1684
1 changed files with 12 additions and 0 deletions

View File

@ -817,6 +817,12 @@ _e_comp_intercept_resize(void *data, Evas_Object *obj, int w, int h)
//INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph); //INF("CALLBACK: REQ(%dx%d) != CUR(%dx%d)", w - fw, h - fh, pw, ph);
evas_object_smart_callback_call(obj, "client_resize", NULL); evas_object_smart_callback_call(obj, "client_resize", NULL);
e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h); e_comp_object_frame_wh_adjust(obj, pw, ph, &w, &h);
if ((cw->w == w) && (cw->h == h))
{
/* going to be a noop resize which won't trigger smart resize */
RENDER_DEBUG("DAMAGE RESIZE(%p): %", cw->ec, cw->ec->client.w, cw->ec->client.h);
if (cw->updates) eina_tiler_area_size_set(cw->updates, cw->ec->client.w, cw->ec->client.h);
}
evas_object_resize(obj, w, h); evas_object_resize(obj, w, h);
} }
else else
@ -1985,9 +1991,15 @@ _e_comp_smart_resize(Evas_Object *obj, int w, int h)
evas_object_geometry_set(cw->input_obj, cw->x + cw->input_rect.x, cw->y + cw->input_rect.y, cw->input_rect.w, cw->input_rect.h); evas_object_geometry_set(cw->input_obj, cw->x + cw->input_rect.x, cw->y + cw->input_rect.y, cw->input_rect.w, cw->input_rect.h);
if (!first) if (!first)
{ {
RENDER_DEBUG("DAMAGE UNFULL: %p", cw->ec);
cw->updates_full = 0; cw->updates_full = 0;
if (cw->updates) eina_tiler_clear(cw->updates); if (cw->updates) eina_tiler_clear(cw->updates);
} }
else
{
RENDER_DEBUG("DAMAGE RESIZE(%p): %dx%d", cw->ec, cw->ec->client.w, cw->ec->client.h);
if (cw->updates) eina_tiler_area_size_set(cw->updates, cw->ec->client.w, cw->ec->client.h);
}
} }
else else
{ {