ecore-evas-wl: Reduce useless compositor redraws during render update

and update input & opaque regions after resizing.

@bugfix: We do not need to call ecore_wl_window_damage & commit here.
The damages are already handled in the evas engine for both shm & egl.
Those damages are sent to the compositor Already from the evas engine,
so we don't need to send the same damages twice. This reduces more
useless compositor redraws as we are not constantly sending damages &
calling commit twice for every frame.

Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
Chris Michael 2014-04-09 09:44:16 +01:00
parent f0e90d25e3
commit 99962a5893
1 changed files with 14 additions and 11 deletions

View File

@ -69,19 +69,18 @@ _ecore_evas_wl_common_render_updates_process(Ecore_Evas *ee, Eina_List *updates)
if ((ee->visible) && (updates))
{
Eina_List *l = NULL;
Eina_Rectangle *r;
Ecore_Evas_Engine_Wl_Data *wdata;
/* Eina_List *l = NULL; */
/* Eina_Rectangle *r; */
/* Ecore_Evas_Engine_Wl_Data *wdata; */
if (!(wdata = ee->engine.data)) return 0;
/* if (!(wdata = ee->engine.data)) return 0; */
EINA_LIST_FOREACH(updates, l, r)
ecore_wl_window_damage(wdata->win,
r->x, r->y, r->w, r->h);
/* EINA_LIST_FOREACH(updates, l, r) */
/* ecore_wl_window_damage(wdata->win, */
/* r->x, r->y, r->w, r->h); */
ecore_wl_window_commit(wdata->win);
ecore_wl_flush();
/* ecore_wl_window_commit(wdata->win); */
/* ecore_wl_flush(); */
_ecore_evas_idle_timeout_update(ee);
rend = 1;
@ -740,7 +739,11 @@ _ecore_evas_wl_common_resize(Ecore_Evas *ee, int w, int h)
evas_object_resize(wdata->frame, w, h);
if (wdata->win)
ecore_wl_window_update_size(wdata->win, w, h);
{
ecore_wl_window_update_size(wdata->win, w, h);
ecore_wl_window_input_region_set(wdata->win, 0, 0, w, h);
ecore_wl_window_opaque_region_set(wdata->win, 0, 0, w, h);
}
if (ee->func.fn_resize) ee->func.fn_resize(ee);
}