zmike pushed a commit to branch efl-1.22.

http://git.enlightenment.org/core/efl.git/commit/?id=d5fb149db2afd11d6fa57c8ea3046edd811b19cc

commit d5fb149db2afd11d6fa57c8ea3046edd811b19cc
Author: Jaehyun Cho <jae_hyun....@samsung.com>
Date:   Wed Apr 24 14:44:50 2019 +0900

    efl_canvas_animation_player: fix to apply animation when player starts
    
    Previously, animation was not applied immediately when player starts
    animation because elapsed time is 0.
    This caused flickering object if animation begins with alpha 0 because
    the alpha 0 animation is not applied immediately.
    
    Now, animation is applied immediately when player start animation.
---
 src/lib/evas/canvas/efl_canvas_animation_player.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/lib/evas/canvas/efl_canvas_animation_player.c 
b/src/lib/evas/canvas/efl_canvas_animation_player.c
index 677443a5f5..063f932d49 100644
--- a/src/lib/evas/canvas/efl_canvas_animation_player.c
+++ b/src/lib/evas/canvas/efl_canvas_animation_player.c
@@ -84,8 +84,12 @@ _animator_cb(void *data)
         duration = efl_animation_duration_get(anim);
         elapsed_time = pd->time.current - pd->time.prev;
         vector = elapsed_time / duration;
-        
-        if (vector <= DBL_EPSILON)
+
+        /* When animation player starts, _animator_cb() is called immediately 
so
+         * both elapsed time and progress are 0.0.
+         * Since it is the beginning of the animation if progress is 0.0, the
+         * following codes for animation should be executed. */
+        if ((vector <= DBL_EPSILON) && (pd->progress != 0.0))
           return ECORE_CALLBACK_RENEW; // There is no update.
 
         //TODO: check negative play_speed.

-- 


Reply via email to