• klausw's avatar
    WebVR: fix initial vsync · 262e77a7
    klausw authored
    Applications sometimes use window.rAF while not presenting, then switch to
    vrDisplay.rAF after presentation starts. Depending on the animation loop's
    timing, this can cause a race condition where presentation has been started
    but there's no vrDisplay.rAF pending yet. Ensure there's at least vsync
    being processed after presentation starts so that a queued window.rAF
    can run and schedule a vrDisplay.rAF.
    
    BUG=711789
    
    Review-Url: https://codereview.chromium.org/2848483003
    Cr-Commit-Position: refs/heads/master@{#468167}
    262e77a7
VRDisplay.cpp 30.3 KB