• Thomas Guilbert's avatar
    [video-raf] Add high fps auto-rescheduling · 89210157
    Thomas Guilbert authored
    A lot of frames are missed when using video.rAF to paint high frame rate
    videos (60fps). This is partially caused because, even if there is a new
    frame ready to be painted, the calls to OnRequestAnimationFrame() after
    jumping back on the main thread arrives too late, and we have to wait
    until the next rendering steps.
    
    This CL adds the logic to automatically re-schedule video.rAF execution
    in the next rendering steps if we have a high enough frame rate, we have
    more callbacks to run, and we consistently get new frames.
    
    This CL might be revisited after collecting data from the canary builds.
    
    Bug: 1012063
    Change-Id: I90a63e32d774886c9e276b282ee105d1f359f968
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2079302
    Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
    Reviewed-by: default avatarMounir Lamouri <mlamouri@chromium.org>
    Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#745747}
    89210157
video_frame_compositor.cc 14.5 KB