summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorRafael Antognolli <rafael.antognolli@intel.com>2013-11-01 14:19:11 -0200
committerRafael Antognolli <rafael.antognolli@intel.com>2013-11-01 15:07:53 -0200
commit839a737a626d6840c37ce166cc8834b765595bc1 (patch)
tree45c863660bc9ae68e4f4e5f9bd988e929b60749a /src/modules
parent1c33a1a57b964d9080909c3e9e93f109d11c674f (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.c24
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_private.h2
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 705d5883e8..4aa27df1bc 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)
516 LOGFN(__FILE__, __LINE__, __FUNCTION__); 516 LOGFN(__FILE__, __LINE__, __FUNCTION__);
517 517
518 wdata = ee->engine.data; 518 wdata = ee->engine.data;
519 if (wdata->frame_callback) wl_callback_destroy(wdata->frame_callback);
520 wdata->frame_callback = NULL;
519 if (wdata->win) ecore_wl_window_free(wdata->win); 521 if (wdata->win) ecore_wl_window_free(wdata->win);
520 wdata->win = NULL; 522 wdata->win = NULL;
521 free(wdata); 523 free(wdata);
@@ -1220,14 +1222,15 @@ _ecore_evas_wl_frame_complete(void *data, struct wl_callback *callback, uint32_t
1220 wdata = ee->engine.data; 1222 wdata = ee->engine.data;
1221 if (!(win = wdata->win)) return; 1223 if (!(win = wdata->win)) return;
1222 1224
1223 win->frame_callback = NULL; 1225 wdata->frame_callback = NULL;
1224 win->frame_pending = EINA_FALSE; 1226 wdata->frame_pending = EINA_FALSE;
1225 wl_callback_destroy(callback); 1227 wl_callback_destroy(callback);
1226 1228
1227 if (win->surface) 1229 if (ecore_wl_window_surface_get(win))
1228 { 1230 {
1229 win->frame_callback = wl_surface_frame(win->surface); 1231 wdata->frame_callback = wl_surface_frame
1230 wl_callback_add_listener(win->frame_callback, &frame_listener, ee); 1232 (ecore_wl_window_surface_get(win));
1233 wl_callback_add_listener(wdata->frame_callback, &frame_listener, ee);
1231 } 1234 }
1232} 1235}
1233 1236
@@ -1264,14 +1267,15 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee)
1264 1267
1265 if (!ee->can_async_render) 1268 if (!ee->can_async_render)
1266 { 1269 {
1267 if (!win->frame_pending) 1270 if (!wdata->frame_pending)
1268 { 1271 {
1269 Eina_List *updates; 1272 Eina_List *updates;
1270 1273
1271 if (!win->frame_callback) 1274 if (!wdata->frame_callback)
1272 { 1275 {
1273 win->frame_callback = wl_surface_frame(win->surface); 1276 wdata->frame_callback = wl_surface_frame
1274 wl_callback_add_listener(win->frame_callback, 1277 (ecore_wl_window_surface_get(win));
1278 wl_callback_add_listener(wdata->frame_callback,
1275 &frame_listener, ee); 1279 &frame_listener, ee);
1276 } 1280 }
1277 1281
@@ -1280,7 +1284,7 @@ _ecore_evas_wl_common_render(Ecore_Evas *ee)
1280 evas_render_updates_free(updates); 1284 evas_render_updates_free(updates);
1281 1285
1282 if (rend) 1286 if (rend)
1283 win->frame_pending = EINA_TRUE; 1287 wdata->frame_pending = EINA_TRUE;
1284 } 1288 }
1285 } 1289 }
1286 else if (evas_render_async(ee->evas)) 1290 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 c1fac29c26..8de0887222 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
35#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL 35#ifdef BUILD_ECORE_EVAS_WAYLAND_EGL
36 struct wl_egl_window *egl_win; 36 struct wl_egl_window *egl_win;
37#endif 37#endif
38 Eina_Bool frame_pending : 1;
39 struct wl_callback *frame_callback;
38}; 40};
39 41
40Ecore_Evas_Interface_Wayland *_ecore_evas_wl_interface_new(void); 42Ecore_Evas_Interface_Wayland *_ecore_evas_wl_interface_new(void);