From: Mike Blumenkrantz Date: Wed, 25 Sep 2019 10:47:49 +0000 (-0400) Subject: efl_ui/image: fix playback_speed timer calcs X-Git-Tag: submit/tizen/20190925.214157~17 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a017c5137dbb975ab0eefed5ed9a2876c74275b1;p=platform%2Fupstream%2Fefl.git efl_ui/image: fix playback_speed timer calcs I accidentally inverted this; the frame timing needs to be divided by the playback speed to have the correct time here Reviewed-by: Cedric BAIL Differential Revision: https://phab.enlightenment.org/D10147 --- diff --git a/src/lib/elementary/efl_ui_image.c b/src/lib/elementary/efl_ui_image.c index 16f1f73..7a6b2f6 100644 --- a/src/lib/elementary/efl_ui_image.c +++ b/src/lib/elementary/efl_ui_image.c @@ -141,7 +141,7 @@ _efl_ui_image_animate_cb(void *data) (sd->img, sd->cur_frame, 0); if (sd->frame_duration > 0) - ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed); + ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed); return ECORE_CALLBACK_RENEW; } @@ -1778,7 +1778,7 @@ _efl_ui_image_animated_set_internal(Eo *obj, Efl_Ui_Image_Data *sd, Eina_Bool an evas_object_image_animated_frame_set(sd->img, sd->cur_frame); if (!sd->paused)//legacy sd->anim_timer = ecore_timer_add - (sd->frame_duration * sd->playback_speed, _efl_ui_image_animate_cb, obj); + (sd->frame_duration / sd->playback_speed, _efl_ui_image_animate_cb, obj); } else { @@ -1837,7 +1837,7 @@ _efl_ui_image_efl_player_playback_speed_set(Eo *obj EINA_UNUSED, Efl_Ui_Image_Da efl_player_playback_speed_set(sd->img, factor); else if (sd->anim_timer) { - ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed); + ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed); ecore_timer_reset(sd->anim_timer); } } @@ -1897,7 +1897,7 @@ _efl_ui_image_animated_paused_set_internal(Eo *obj, Efl_Ui_Image_Data *sd, Eina_ if (!paused) { sd->anim_timer = ecore_timer_add - (sd->frame_duration * sd->playback_speed, _efl_ui_image_animate_cb, obj); + (sd->frame_duration / sd->playback_speed, _efl_ui_image_animate_cb, obj); } else { diff --git a/src/lib/elementary/efl_ui_image_zoomable.c b/src/lib/elementary/efl_ui_image_zoomable.c index 8e8323f..e7abd48 100644 --- a/src/lib/elementary/efl_ui_image_zoomable.c +++ b/src/lib/elementary/efl_ui_image_zoomable.c @@ -3048,7 +3048,7 @@ _efl_ui_image_zoomable_animate_cb(void *data) (sd->img, sd->cur_frame, 0); if (sd->frame_duration > 0) - ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed); + ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed); return ECORE_CALLBACK_RENEW; } @@ -3078,7 +3078,7 @@ _efl_ui_image_zoomable_animated_set_internal(Eo *obj EINA_UNUSED, Efl_Ui_Image_Z evas_object_image_animated_frame_set(sd->img, sd->cur_frame); if (!sd->paused)//legacy sd->anim_timer = ecore_timer_add - (sd->frame_duration * sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj); + (sd->frame_duration / sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj); } else { @@ -3105,7 +3105,7 @@ _efl_ui_image_zoomable_animated_paused_set_internal(Eo *obj, Efl_Ui_Image_Zoomab if (!paused) { sd->anim_timer = ecore_timer_add - (sd->frame_duration * sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj); + (sd->frame_duration / sd->playback_speed, _efl_ui_image_zoomable_animate_cb, obj); } else { @@ -3151,7 +3151,7 @@ _efl_ui_image_zoomable_efl_player_playback_speed_set(Eo *obj EINA_UNUSED, Efl_Ui efl_player_playback_speed_set(sd->edje, factor); else if (sd->anim_timer) { - ecore_timer_interval_set(sd->anim_timer, sd->frame_duration * sd->playback_speed); + ecore_timer_interval_set(sd->anim_timer, sd->frame_duration / sd->playback_speed); ecore_timer_reset(sd->anim_timer); } }