ecore-evas wayland: move frame sending to pre-flush callback
authorMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 15 Dec 2015 22:14:43 +0000 (17:14 -0500)
committerMike Blumenkrantz <zmike@osg.samsung.com>
Tue, 15 Dec 2015 22:24:52 +0000 (17:24 -0500)
it was possible to deadlock rendering if a pre-render occurred but
the resulting render had no updated regions

@fix

src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_egl.c
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_shm.c

index 75ac428..f10f4d0 100644 (file)
@@ -1289,7 +1289,7 @@ static const struct wl_callback_listener _anim_listener =
 };
 
 void
-_ecore_evas_wl_common_render_pre(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED)
+_ecore_evas_wl_common_render_flush_pre(void *data, Evas *evas EINA_UNUSED, void *event EINA_UNUSED)
 {
    Ecore_Evas *ee = data;
    Ecore_Evas_Engine_Wl_Data *wdata;
@@ -1299,15 +1299,6 @@ _ecore_evas_wl_common_render_pre(void *data, Evas *evas EINA_UNUSED, void *event
      wl_surface_frame(ecore_wl2_window_surface_get(wdata->win));
    wl_callback_add_listener(wdata->anim_callback, &_anim_listener, ee);
    ecore_evas_manual_render_set(ee, 1);
-}
-
-void
-_ecore_evas_wl_common_render_flush_pre(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->win->configure_ack && wdata->win->configure_serial)
      wdata->win->configure_ack(wdata->win->xdg_surface,
                                wdata->win->configure_serial);
index 8836630..c6def65 100644 (file)
@@ -314,9 +314,6 @@ ecore_evas_wayland_egl_new_internal(const char *disp_name, unsigned int parent,
      evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST, 
                              _ecore_evas_wl_common_render_updates, ee);
 
-   evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE,
-                            _ecore_evas_wl_common_render_pre, ee);
-
    evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
                            _ecore_evas_wl_common_render_flush_pre, ee);
 
index c815f79..be092fb 100644 (file)
@@ -312,9 +312,6 @@ ecore_evas_wayland_shm_new_internal(const char *disp_name, unsigned int parent,
      evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_POST,
                             _ecore_evas_wl_common_render_updates, ee);
 
-   evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_PRE,
-                            _ecore_evas_wl_common_render_pre, ee);
-
    evas_event_callback_add(ee->evas, EVAS_CALLBACK_RENDER_FLUSH_PRE,
                            _ecore_evas_wl_common_render_flush_pre, ee);