• Max Rebuschatis's avatar
    Make XR FrameData and Environment mojo associated · 126a1168
    Max Rebuschatis authored
    The XRFrameDataProvider now returns an associated
    XREnvironmentDataProvider interface so that the
    two share callback queues and thus allow strict
    ordering of the two interfaces. This is critical
    for frame synchronization between frames and the
    associated environment data.
    
    Note: We can't just mark the interfaceptrs for
    XRFrameDataProvider and
    XREnvironmentIntegrationProvider as associated
    in the XRSession struct. XRDevice implementations
    mostly live on separate threads from the
    XRFrameDataProviders, so we'd have extra thread
    hopping. For the VR headsets we explicitly live
    off the main thread to avoid latency, and because
    we do some work that may block the thread the
    XRFrameDataProvider lives on (for example waiting
    for vsync, or submitting frames to headset APIs).
    
    Bug: 867057, 876135, 843376
    Change-Id: If2fb62fcd185825209dec08e421df05f34d41c30
    Reviewed-on: https://chromium-review.googlesource.com/c/1171794
    Commit-Queue: Max Rebuschatis <lincolnfrog@chromium.org>
    Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
    Reviewed-by: default avatarBill Orr <billorr@chromium.org>
    Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#605545}
    126a1168
vr_display_impl.cc 3.26 KB