Initialize VRDevices on first successful RequestSession |
|||||||||||||
Issue descriptionARCoreDevice initializes some parts (the mailbox bridge and the GL thread) on construction and then some other parts (ARCore) during the first successful RequestSession call. Ideally, not even the GL thread should start if no session has been requested. While fixing this issue please note that multiple RequestSession can come from the render process and they should be correctly handled (with a container to store the remaining requests while one request is being resolved, for example).
,
Jun 7 2018
,
Jun 7 2018
I'm changing the summary to address the general problem.
,
Jun 7 2018
,
Jul 4
,
Aug 7
Removing Blink>WebVR component and assigning to Blink>WebXR
,
Aug 7
Removing Blink>WebVR component and assigning to Blink>WebXR
,
Aug 7
,
Aug 29
@billorr says 1 day for a simple fix and ~5d for refactoring that would make it more general across other devices. When fixing this bug, please file a new bug for a larger fix if you only do the simple fix.
,
Sep 4
,
Sep 14
@billorr : what is the impact of not fixing this bug? do you think this is required/MUST (P1) or should fix (P2)?
,
Oct 2
,
Nov 21
ARCoreDevice has been refactored to clean up some of this, but we still create the mailbox_bridge_ and the context provider in ARCoreDevice's constructor. When that is ready. When that completes, we create arcore_gl_thread_ and start it. We do delay initializing arcore until the ar dfm is installed. GvrDevice has been changed to initialize when either VRDisplayInfo is needed for webvr (through EnsureInitialized()) or when a session is requested. Desktop devices also need to be updated to delay initialization. The 1-day "simple fix" is to just avoid calling mailbox_bridge_->CreateUnboundContextProvider() until requestSession, along with appropriate checking that we are in a valid state throughout. With the larger refactor, browser-side requestSession will now do 1. call into provider to check that it can support the session. 2. call into the provider to ensure everything is up to date. 3. request permissions. 4. call into the device to actually request the session, which will start the runtimes and initialize the device if needed. Note that step 4 requires the simple 1-day fix, but also applied to other devices. I would consider 846521 to be blocking this, and it is effectively the 1-day fix specific for AR.
,
Nov 22
I filed issue 907591 to track the desired overall outcome. It's not clear to me what specific part of that this issue tracks or whether it is now a duplicate. Feel free to use it for whatever makes sense to move us towards the desired outcome in issue 907591.
,
Dec 3
|
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by ddorwin@chromium.org
, Jun 5 2018Components: Blink>WebVR
Labels: -Type-Bug -Pri-3 XR-Device Pri-2 Type-Task