diff options
author | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-01 14:19:11 -0200 |
---|---|---|
committer | Rafael Antognolli <rafael.antognolli@intel.com> | 2013-11-01 15:07:53 -0200 |
commit | 839a737a626d6840c37ce166cc8834b765595bc1 (patch) | |
tree | 45c863660bc9ae68e4f4e5f9bd988e929b60749a /src/modules | |
parent | 1c33a1a57b964d9080909c3e9e93f109d11c674f (diff) |
ecore(_evas)/wayland: Move frame callback to engine data.
It's something specific to the ecore_evas engine/module, so there's no
need to keep this info in the Ecore_Wl_Window.
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 24 | ||||
-rw-r--r-- | src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h | 2 |
2 files changed, 16 insertions, 10 deletions
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 705d5883e..4aa27df1b 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 @@ -516,6 +516,8 @@ _ecore_evas_wl_common_free(Ecore_Evas *ee) LOGFN(__FILE__, __LINE__, __FUNCTION__); wdata = ee->engine.data; + if (wdata->frame_callback) wl_callback_destroy(wdata->frame_callback); + wdata->frame_callback = NULL; if (wdata->win) ecore_wl_window_free(wdata->win); wdata->win = NULL; free(wdata); @@ -1220,14 +1222,15 @@ _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t wdata = ee->engine.data; if (!(win = wdata->win)) return; - win->frame_callback = NULL; - win->frame_pending = EINA_FALSE; + wdata->frame_callback = NULL; + wdata->frame_pending = EINA_FALSE; wl_callback_destroy(callback); - if (win->surface) + if (ecore_wl_window_surface_get(win)) { - win->frame_callback = wl_surface_frame(win->surface); - wl_callback_add_listener(win->frame_callback, &frame_listener, ee); + wdata->frame_callback = wl_surface_frame + (ecore_wl_window_surface_get(win)); + wl_callback_add_listener(wdata->frame_callback, &frame_listener, ee); } } @@ -1264,14 +1267,15 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee) if (!ee->can_async_render) { - if (!win->frame_pending) + if (!wdata->frame_pending) { Eina_List *updates; - if (!win->frame_callback) + if (!wdata->frame_callback) { - win->frame_callback = wl_surface_frame(win->surface); - wl_callback_add_listener(win->frame_callback, + wdata->frame_callback = wl_surface_frame + (ecore_wl_window_surface_get(win)); + wl_callback_add_listener(wdata->frame_callback, &frame_listener, ee); } @@ -1280,7 +1284,7 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee) evas_render_updates_free(updates); if (rend) - win->frame_pending = EINA_TRUE; + wdata->frame_pending = EINA_TRUE; } } else if (evas_render_async(ee->evas)) 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 c1fac29c2..8de088722 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 @@ -35,6 +35,8 @@ struct _Ecore_Evas_Engine_Wl_Data #ifdef BUILD_ECORE_EVAS_WAYLAND_EGL struct wl_egl_window *egl_win; #endif + Eina_Bool frame_pending : 1; + struct wl_callback *frame_callback; }; Ecore_Evas_Interface_Wayland *_ecore_evas_wl_interface_new(void); |