Ensure inline rAFs are not run if an immersive session was created
Because a task is queued to call XRSession::OnFrame for any inline sessions during XRFrameProvider::ProcessScheduledFrame, it is possible for an immersive session to be created while we are waiting for the frame to be served. This creates an "interceptor" method "OnPreDispatchInlineFrame", which can ensure that there is still no immersive session when providing the frame to the XRSession. This "interceptor" method is needed, rather than simply adding the check in XRSession for two reasons: 1) It should not be the responsibility of the XRSession to verify that it should have received the frame. 2) Since the frame is being blocked, the session needs to be added back into the requesting_sessions_ list to prevent the frame loop from timing out. Fixed: 1116261 Change-Id: I61699b65ccb073f709321cbd9f812cf6931bd72b Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2363704Reviewed-by:Brandon Jones <bajones@chromium.org> Commit-Queue: Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/master@{#799637}
Showing
Please register or sign in to comment