Closed Bug 1436791 Opened 6 years ago Closed 6 years ago

Implement VRDisplayExternal

Categories

(Core :: WebVR, enhancement)

59 Branch
enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla61
Tracking Status
firefox61 --- fixed

People

(Reporter: kip, Assigned: kip)

References

Details

Attachments

(2 files)

Rather than including support for every device-specific XR API as a subclass of VRDisplayHost, we can allow Android apps using GeckoView to implement the API interface in the host application.

A VRDisplayExternal subclass of VRDisplayHost will allow the host application to connect to shmem with Android's Binder.  This shmem will contain a struct with a VRDisplayInfo member (including VRHMDSensorData), a struct to describe controller state, additional fields needed for threadsafe synchronization, and fields added as needed for lifecycle management.

VRDisplayExternal will only enumerate a single HMD, but can emit multiple controllers as requested by the host.

Gecko will submit textures and layer information back to the host application by populating a struct describing the requested VR layers for presentation.  The texture used by submitted frames will support all handles included in SurfaceDescriptor.

Although initially used only with GeckoView, the shmem-based interface is intended to be used for embedding on other platforms, including those on desktop.
Attachment #8958323 - Flags: review?(rbarker)
Comment on attachment 8958323 [details]
Bug 1436791 - Implement gfxVRExternal

https://reviewboard.mozilla.org/r/227260/#review233340

::: gfx/vr/gfxVR.h:62
(Diff revision 2)
>    uint32_t mPresentingGroups;
>    uint32_t mGroupMask;
> -  Size mStageSize;
> -  Matrix4x4 mSittingToStandingTransform;
>    uint64_t mFrameId;
>    uint32_t mPresentingGeneration;

I think mPresentingGeneration should be in the Display State as it is how the external client can stop presenting such as when a phone is taken out of a head set. Since there will need to be follow up to add Android support, this can probably wait for that.
Attachment #8958323 - Flags: review?(rbarker) → review+
https://hg.mozilla.org/mozilla-central/rev/04ed9a706cfc
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla61
Depends on: 1445647
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: