From: Seunghun Lee Date: Tue, 19 Apr 2016 02:20:52 +0000 (+0900) Subject: ecore-evas-wayland: Add event handler render_flush_post to handle wm_rotation. X-Git-Tag: accepted/tizen/common/20160421.161722^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0cdc291a88fd902200143f35d1a1f3f4531678b0;p=platform%2Fupstream%2Fefl.git ecore-evas-wayland: Add event handler render_flush_post to handle wm_rotation. Ack rotation done to wm after finishing make rotated frame. Change-Id: I28bfa493379ae21cdfd9995d334ec890c928b401 --- diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 7602b9e..4c203c8 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -360,14 +360,6 @@ _ecore_evas_wl_common_cb_window_rotate(void *data EINA_UNUSED, int type EINA_UNU wdata->wm_rot.done = 1; - /* Fixme: rotation done send move to render flush */ - if (!ee->prop.wm_rot.manual_mode.set) - { - wdata->wm_rot.request = 0; - wdata->wm_rot.done = 0; - ecore_wl_window_rotation_change_done_send(wdata->win); - } - return ECORE_CALLBACK_PASS_ON; } @@ -1631,6 +1623,22 @@ _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas EINA_UNUSED, void ecore_evas_manual_render_set(ee, 1); } +void +_ecore_evas_wl_common_render_flush_post(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED) +{ + Ecore_Evas *ee = data; + Ecore_Evas_Engine_Wl_Data *wdata; + + wdata = ee->engine.data; + if ((wdata) && (wdata->wm_rot.done) && + (!ee->prop.wm_rot.manual_mode.set)) + { + wdata->wm_rot.request = 0; + wdata->wm_rot.done = 0; + ecore_wl_window_rotation_change_done_send(wdata->win); + } +} + void _ecore_evas_wl_common_render_updates(void *data, Evas *evas EINA_UNUSED, void *event) { diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c index cf6f90d..c1e7f21 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c @@ -248,6 +248,8 @@ ecore_evas_wayland_egl_options_new_internal(const char *disp_name, unsigned int evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, _ecore_evas_wl_common_render_flush_pre, ee); + evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, + _ecore_evas_wl_common_render_flush_post, ee); /* FIXME: This needs to be set based on theme & scale */ if (ee->prop.draw_frame) diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h index b14fe7e..e13f88e 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h @@ -85,6 +85,7 @@ int _ecore_evas_wl_common_render(Ecore_Evas *ee); void _ecore_evas_wl_common_screen_geometry_get(const Ecore_Evas *ee, int *x, int *y, int *w, int *h); void _ecore_evas_wl_common_screen_dpi_get(const Ecore_Evas *ee, int *xdpi, int *ydpi); void _ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas EINA_UNUSED, void *event); +void _ecore_evas_wl_common_render_flush_post(void *data, Evas *evas EINA_UNUSED, void *event); void _ecore_evas_wl_common_render_updates(void *data, Evas *evas, void *event); void _ecore_evas_wl_common_rotation_set(Ecore_Evas *ee, int rotation, int resize); void _ecore_evas_wl_common_borderless_set(Ecore_Evas *ee, Eina_Bool on); diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c index 86c9e1ad1..fa4646b 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c @@ -243,6 +243,8 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent, evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE, _ecore_evas_wl_common_render_flush_pre, ee); + evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_POST, + _ecore_evas_wl_common_render_flush_post, ee); /* FIXME: This needs to be set based on theme & scale */ if (ee->prop.draw_frame)