• pdr's avatar
    Prevent synchronous image change notifications during paint · 45eef1a2
    pdr authored
    Image changed notifications are used by animated images to notify
    LayoutObject clients that they need to repaint. These notifications
    typically result in paint invalidations. Animated bitmap images have
    some logic[1] to handle "falling behind" which would synchronously
    fire image changed notifications during paint. This results in missed
    paint invalidations as well as a changing layout tree out from under
    the paint system.
    
    This patch moves the synchronous image change notifications to an
    immediate task which occurs after paint has completed.
    
    [1] When painting animated gifs on a heavily loaded system (or a debug
    build), pauses in the system can cause the animation to get behind.
    When this happens, we want to advance the animation and catch-up but
    prevent the next frame from using the same catch-up logic which could
    get us in an infinite catch-up loop.
    
    BUG=616700
    
    Review-Url: https://codereview.chromium.org/2038243002
    Cr-Commit-Position: refs/heads/master@{#398147}
    45eef1a2
BitmapImage.h 8.12 KB