forked from enlightenment/efl
ecore evas - wl - use loop time for anim tick not compositor timestamp
This commit is contained in:
parent
da2b8ca356
commit
d8a05e2662
|
@ -37,29 +37,30 @@ 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, void *data)
|
||||
_anim_cb_tick(Ecore_Wl2_Window *win EINA_UNUSED, uint32_t timestamp EINA_UNUSED, void *data)
|
||||
{
|
||||
Ecore_Evas *ee = data;
|
||||
Ecore_Evas_Engine_Wl_Data *edata;
|
||||
double t;//, rt;
|
||||
double tnow = ecore_time_get();
|
||||
// double t;//, rt;
|
||||
// double tnow = ecore_time_get();
|
||||
/* static double pt = 0.0, prt = 0.0; */
|
||||
|
||||
edata = ee->engine.data;
|
||||
|
||||
if (!edata->ticking) return;
|
||||
t = ((double)timestamp / 1000.0);
|
||||
if ((t - tnow) < -0.1)
|
||||
{
|
||||
fprintf(stderr,
|
||||
"ecore_evas: _anim_cb_tick() -> tick too far in past - %1.5f sec behind\n",
|
||||
tnow - t);
|
||||
t = tnow;
|
||||
}
|
||||
ecore_loop_time_set(t);
|
||||
// t = ((double)timestamp / 1000.0);
|
||||
// if ((t - tnow) < -0.1)
|
||||
// {
|
||||
// fprintf(stderr,
|
||||
// "ecore_evas: _anim_cb_tick() -> tick too far in past - %1.5f sec behind\n",
|
||||
// tnow - t);
|
||||
// t = tnow;
|
||||
// }
|
||||
// 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);
|
||||
// ecore_evas_animator_tick(ee, NULL, t);
|
||||
ecore_evas_animator_tick(ee, NULL, ecore_loop_time_get());
|
||||
/* pt = t; */
|
||||
/* prt = rt; */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue