ecore evas - tick printf debugs - disabled right now so no noise
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>
Sat, 23 May 2020 08:33:54 +0000 (09:33 +0100)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 24 May 2020 21:32:20 +0000 (06:32 +0900)
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
src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c

index 5aa7424e01dd6dc0c6b718ad0e056424ad36963e..7a10e630c6b19e7519691f33b96ae09e9a66bb8e 100644 (file)
@@ -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);
      }
index 924a3721df4ef5bb5e46f2f797c51694150ac4fa..732b82bba7139cf182fe1a87585fbd90a5b65d03 100644 (file)
@@ -121,16 +121,23 @@ _ecore_evas_wl_common_rotate_update(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