• Alex Cooper's avatar
    Ensure that XRSessions only request a runtime if needed · af87185e
    Alex Cooper authored
    If the only features requested for an XRSession can be fully supported
    by a sensorless session, then just create the sensorless session rather
    than trying to get a fully device backed session.  There were cases
    where the only requested features were "viewer", but the session was
    still being backed by the orientation_sensors device.
    
    This change introduces an enum that indicates whether sensor data, and
    therefore a runtime, is needed, optional, or not required. If sensor
    data is not required, then a sensorless session is created rather than
    querying for device support.
    
    This also refactors "CanRequestSensorlessInlineSession" to an enum, to
    better consolidate and support this expanded logic.
    
    Fixed: 1018794
    Change-Id: I0b930a733ccab85275fcc965969a17313cb3cf9e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1884827
    Commit-Queue: Alexander Cooper <alcooper@chromium.org>
    Reviewed-by: default avatarKlaus Weidner <klausw@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#710608}
    af87185e
xr.cc 42.7 KB