}
static void
-_timer_send_time(double t, Ecore_Thread *thread)
+_timer_send_time(Ecore_Thread *thread)
{
- double *tim = malloc(sizeof(*tim));
- if (tim)
- {
- *tim = t;
- DBG(" ... send %1.8f", t);
- eina_spinlock_take(&tick_queue_lock);
- tick_queue_count++;
- eina_spinlock_release(&tick_queue_lock);
- ecore_thread_feedback(thread, tim);
- }
+ DBG(" ... send %1.8f", ecore_time_get());
+ eina_spinlock_take(&tick_queue_lock);
+ tick_queue_count++;
+ eina_spinlock_release(&tick_queue_lock);
+ ecore_thread_feedback(thread, NULL);
}
static void
}
else if (data_timeout)
{
- if (tick) _timer_send_time(t0 - d + ft, thread);
+ if (tick) _timer_send_time(thread);
}
}
}
}
else if (data_timeout)
{
- if (tick) _timer_send_time(t0 - d + ft, thread);
+ if (tick) _timer_send_time(thread);
}
}
}
}
static void
-_timer_tick_notify(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED, void *msg)
+_timer_tick_notify(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED, void *msg EINA_UNUSED)
{
int tick_queued;
tick_queued = tick_queue_count;
tick_queue_count--;
eina_spinlock_release(&tick_queue_lock);
- DBG("notify.... %3.3f %i", *((double *)msg), timer_event_is_busy);
+ DBG("notify.... %i", timer_event_is_busy);
if (timer_event_is_busy)
{
- double *t = msg;
+ double t;
static double pt = 0.0;
+ t = ecore_time_get();
- DBG("VSYNC %1.8f = delt %1.8f", *t, *t - pt);
+ DBG("VSYNC %1.8f = delt %1.8f(%1.8f)", t, t - pt);
if ((!tick_skip) || (tick_queued == 1))
{
- ecore_loop_time_set(*t);
+ ecore_loop_time_set(t);
#ifndef _WIN32
if (!exit_signal_received)
#endif
_do_tick();
_ecore_animator_flush();
}
- pt = *t;
+ pt = t;
}
- free(msg);
}
static void
}
static void
-_tdm_send_time(double t)
+_tdm_send_time()
{
- double *tim = malloc(sizeof(*tim));
- if (tim)
- {
- *tim = t;
- DBG("tdm send time @%1.5f ... send %1.8f\n", ecore_time_get(), t);
- eina_spinlock_take(&tick_queue_lock);
- tick_queue_count++;
- eina_spinlock_release(&tick_queue_lock);
- ecore_thread_feedback(tdm_thread, tim);
- }
+ DBG("tdm send time @%1.5f\n", ecore_time_get());
+ eina_spinlock_take(&tick_queue_lock);
+ tick_queue_count++;
+ eina_spinlock_release(&tick_queue_lock);
+ ecore_thread_feedback(tdm_thread, NULL);
}
static void
tdelta_avg = 0.0;
tdelta_n = 0;
}
- _tdm_send_time(t);
+ _tdm_send_time();
pseq = sequence;
}
}
if (err != TDM_ERROR_NONE) {
ERR("tdm_client_handle_events failed err %d\n", err);
vblank_wait = 0;
- _tdm_send_time(ecore_time_get());
+ _tdm_send_time();
}
}
else
}
static void
-_tdm_tick_notify(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED, void *msg)
+_tdm_tick_notify(void *data EINA_UNUSED, Ecore_Thread *thread EINA_UNUSED, void *msg EINA_UNUSED)
{
int tick_queued;
tick_queued = tick_queue_count;
tick_queue_count--;
eina_spinlock_release(&tick_queue_lock);
- DBG("notify.... %3.3f %i", *((double *)msg), tdm_event_is_busy);
+ DBG("notify.... %i", tdm_event_is_busy);
if (tdm_event_is_busy)
{
- double *t = msg;
+ double t;
static double pt = 0.0;
+ t = ecore_time_get();
- DBG("VSYNC %1.8f = delt %1.8f", *t, *t - pt);
- if (((!tick_skip) || (tick_skip && tick_queued == 1)) && (*t > pt))
+ DBG("VSYNC %1.8f = delt %1.8f (%1.8f)", t, t - pt);
+ if (((!tick_skip) || (tick_skip && tick_queued == 1)) && (t > pt))
{
- ecore_loop_time_set(*t);
+ ecore_loop_time_set(t);
ecore_animator_custom_tick();
- pt = *t;
+ pt = t;
}
else if ((tick_skip) && (tick_queued > 10))
{
DBG("skip this vsync for schedule queued %d\n", tick_queued);
}
}
- free(msg);
}
static Eina_Bool