• Khushal's avatar
    blink: Cleanup image animation advancement in BitmapImage. · 44c1acfc
    Khushal authored
    When catching up the animation, if the StartAnimation call for
    advancing the next frame was delayed, if n is the desired current frame,
    we advance uptill frame n-1 and a post a task to further advance to
    frame n. This task also calls StartAnimation to schedule a task for
    the next frame of the animation. In this call, kDoNotCatchUp is used to
    avoid going through a catch up loop and schedule this task immediately
    if necessary.
    
    Clean up the logic to advance to frame n during catch up and schedule
    the next task synchronously. And add a test.
    
    R=chrishtr@chromium.org
    
    Change-Id: I5fdb1d978001b0bf5f04cdaf4dada110db065801
    Reviewed-on: https://chromium-review.googlesource.com/674056
    Commit-Queue: Khushal <khushalsagar@chromium.org>
    Reviewed-by: default avatarPhilip Rogers <pdr@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#504249}
    44c1acfc
Image.h 10.4 KB