static void
_anim_cb_animate(void *data, struct wl_callback *callback, uint32_t serial EINA_UNUSED)
{
- Ecore_Evas_Engine_Wl_Data *wdata = data;
-
- if ((wdata->anim_callback) && (callback != wdata->anim_callback)) return;
+ Ecore_Evas *ee = data;
+ Ecore_Evas_Engine_Wl_Data *wdata;
+ wdata = ee->engine.data;
wl_callback_destroy(callback);
wdata->anim_callback = NULL;
+ ecore_evas_manual_render_set(ee, 0);
}
static const struct wl_callback_listener _anim_listener =
_anim_cb_animate
};
+void
+_ecore_evas_wl_common_render_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;
+ wdata->anim_callback = wl_surface_frame(ecore_wl_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_updates(void *data, Evas *evas EINA_UNUSED, void *event)
{
ee->in_async_render = EINA_FALSE;
- if (_ecore_evas_wl_common_render_updates_process(ee, ev->updated_area))
- {
- Ecore_Evas_Engine_Wl_Data *wdata = ee->engine.data;
-
- wdata->anim_callback = wl_surface_frame(ecore_wl_window_surface_get(wdata->win));
- wl_callback_add_listener(wdata->anim_callback, &_anim_listener, wdata);
- }
+ _ecore_evas_wl_common_render_updates_process(ee, ev->updated_area);
if (ee->delayed.alpha_changed)
{
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);
+
/* FIXME: This needs to be set based on theme & scale */
if (ee->prop.draw_frame)
evas_output_framespace_set(ee->evas, fx, fy, fw, fh);
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_pre(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);
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);
+
/* FIXME: This needs to be set based on theme & scale */
if (ee->prop.draw_frame)
evas_output_framespace_set(ee->evas, fx, fy, fw, fh);