New issue
Advanced search Search tips

Issue 836524 link

Starred by 4 users

Issue metadata

Status: Available
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Task
Proj-VR
Proj-XR

Blocking:
issue 843374
issue 862458



Sign in to add a comment

Refactor ARCoreDevice's usage of MailboxToSurfaceBridge to make initialization and threads cleaner

Project Member Reported by lincolnfrog@chromium.org, Apr 25 2018

Issue description

We need to change MailboxToSurfaceBridge / ARCore's usage of it in order to clean things up. This task includes refactoring ARCoreDevice into two classes - one that implements the ARCoreDriverAPI and lives on the GL thread and the other that handles calls to/from blink and lives on the UI thread. This will make the usage of threads clearer and hopefully clean up the code substantially - needing less callbacks etc.

klausw@ and lincolnfrog@ have plans for this:
The current usage in WebVR requires setting a surface on it before creating the context provider. I'm in favor of refactoring this, i.e. by adding multiple constructors, or by splitting into a context-establishing class that passes a freshly created method-providing class to OnMailboxBridge ready.

 
Description: Show this description
Labels: Proj-XR-AR
We should be able to eliminate mailbox_bridge_, which only exists to hold onto the object until an initialization callback is called.
Specifically, it'd be nice to not have two separate paths and member variables in the same class:
1. CreateAndBindContextProvider / on_context_bound_
2. CreateUnboundContextProvider / BindContextProviderToCurrentThread/ on_context_provider_ready_
Rename DestroyContext() for more accuracy
Components: Blink>WebXR
Blocking: 862458
Blocking: 843374
Components: -Blink>WebXR Blink>WebXR>AR
Labels: BlinkWebXR
Removing Blink>WebVR component and assigning to Blink>WebXR 
Components: Blink>WebXR
Labels: -BlinkWebXR
Removing Blink>WebVR component and assigning to Blink>WebXR 
Components: -Blink>WebVR
Labels: AR-Cleanup
Components: -Blink>WebXR -Blink>WebXR>AR Internals>XR>AR
Owner: ----
Status: Available (was: Assigned)

Sign in to add a comment