From 09ab8c9967512e67b721e59c9eabda2d887890c8 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Sat, 23 May 2020 09:33:54 +0100 Subject: [PATCH] ecore evas - tick printf debugs - disabled right now so no noise this is here so it can be turned on and off to see what's happening with ticking and tick latency --- src/modules/ecore_evas/engines/drm/ecore_evas_drm.c | 1 + .../engines/wayland/ecore_evas_wayland_common.c | 13 ++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c index ca0f61413c..c8f0eb8c24 100644 --- a/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c +++ b/src/modules/ecore_evas/engines/drm/ecore_evas_drm.c @@ -721,6 +721,7 @@ _cb_pageflip(int fd EINA_UNUSED, unsigned int frame EINA_UNUSED, unsigned int se ecore_drm2_output_info_get(output, &x, &y, &w, &h, NULL); if (!edata->once) t = ecore_time_get(); +// printf("ECORE_EVAS: drm tick %1.5f @ %1.5f\n", t, ecore_time_get()); ecore_evas_animator_tick(ee, &(Eina_Rectangle){x, y, w, h}, t - edata->offset); } 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 0331c2a56c..9c079d9868 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 @@ -37,16 +37,23 @@ static void _ecore_evas_wl_selection_init(Ecore_Evas *ee); /* local functions */ static void -_anim_cb_tick(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp EINA_UNUSED, void *data) +_anim_cb_tick(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp, void *data) { Ecore_Evas *ee = data; Ecore_Evas_Engine_Wl_Data *edata; + double t, rt; + static double pt = 0.0, prt = 0.0; edata = ee->engine.data; if (!edata->ticking) return; - - ecore_evas_animator_tick(ee, NULL, ecore_loop_time_get()); + t = ((double)timestamp / 1000.0); + ecore_loop_time_set(t); + rt = ecore_time_get(); +// printf("ECORE_EVAS: wl client anim tick %p | %p - %1.5f @ %1.5f delt=%1.5f | %1.5f\n", ee, edata, t, ecore_time_get(), t - pt, rt - prt); + ecore_evas_animator_tick(ee, NULL, t); + pt = t; + prt = rt; } static void