[Webkit-unassigned] [Bug 140164] Animation is stopped not at the destination position when CPU is low and busy

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jan 7 18:50:14 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=140164

--- Comment #3 from Mark Wang <mwang at opentv.com> ---
The tastcase can be any animation whose iteration_count is 1, but it must be run in the special environment of the low and busy CPU, like embedded system.

In order to reproduce this issue, you can manually change runningTime in normalizedAnimationValue() to be longer. 

For example:
static double normalizedAnimationValue(double runningTime, double duration, Animation::AnimationDirection direction, double iterationCount)
{
    if (!duration)
        return 0;

// changing runningTime to be longer manually. 
#if 1
    if (runningTime > 0.7* duration)
        runningTime = 2.7 * duration;
#endif

    const int loopCount = runningTime / duration;
    const double lastFullLoop = duration * double(loopCount);
    const double remainder = runningTime - lastFullLoop;
    // Ignore remainder when we've reached the end of animation.
    const double normalized = (loopCount == iterationCount) ? 1.0 : (remainder / duration);

    return shouldReverseAnimationValue(direction, loopCount) ? 1 - normalized : normalized;
}

Theortically, runningTime could be any value, which depends on the CPU and its running state, and the last frame of an animation must be drawn at the destination position, but the above case draws the last frame at the wrong position if animation's iteration_count is 1. 

Alexey Proskuryakov's attachment#244226 can fix this issue.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20150108/b17da84f/attachment-0002.html>


More information about the webkit-unassigned mailing list