When the ecore_animator_source_set() is called with different sources repeatedly, sometimes internal timer is not deleted and this leads animator misbehavior.
Especially when the source is changed from ECORE_ANIMATOR_SOURCE_TIMER to ECORE_ANIMATOR_SOURCE_CUSTOM before the SOURCE_TIMER's internal timer is deleted, this problem occurs.
In this case, even though _end_tick() is called in ecore_animator_source_set(), the SOURCE_TIMER's timer is not deleted because the source is already changed to CUSTOM.
So we should delete the internal timer in _end_tick() in all cases.
+2013-11-26 Daniel Juyung Seo (SeoZ)
+
+ * ecore anim: Fixed animator not working problem when source_set is
+ changed back and forth very fast.
+
2013-11-26 Cedric Bail
* Evas: Allow fuzziness on the texture format returned by GL.
* Ecore:
- Don't leak fd on exec.
- Fix fd handler increase issue when ecore_pipe_add/del is called repeatedly.
+ - Fixed animator not working problem when source_set is changed back and forth very fast.
* Ecore_Con:
- Fix a memory leak in ecore_con_dns when using ecore_con_server_connect.
- Don't leak fd on exec.
{
if (!ticking) return;
ticking = 0;
- switch (src)
- {
- case ECORE_ANIMATOR_SOURCE_TIMER:
- if (timer)
- {
- _ecore_timer_del(timer);
- timer = NULL;
- }
- break;
- case ECORE_ANIMATOR_SOURCE_CUSTOM:
- if (end_tick_cb) end_tick_cb((void *)end_tick_data);
- break;
-
- default:
- break;
+ if (timer)
+ {
+ _ecore_timer_del(timer);
+ timer = NULL;
}
+
+ if ((src == ECORE_ANIMATOR_SOURCE_CUSTOM) && end_tick_cb)
+ end_tick_cb((void *)end_tick_data);
}
static Eina_Bool