mozilla / standards-positions

https://mozilla.github.io/standards-positions/
Mozilla Public License 2.0
639 stars 69 forks source link

WebXR Layers API #412

Open MortimerGoro opened 4 years ago

MortimerGoro commented 4 years ago

Request for Mozilla Position on an Emerging Web Specification

Other information

The spec adds support for composition layers to the WebXR spec. Composition layers have many benefits:

WebXR Layers, specifically XRProjectionLayer, will also enable a better render path for our gecko WebXR implementation:

Regarding privacy or fingerprinting I think it's a pretty safe API. I don't think it exposes anything new that is not already exposed in WebXR and WebGL. The only thing I see is knowing if a device supports compositor layers or not. Our initial plan is to implement the XRPRojectionLayer subset, which is always guaranteed to be supported, so not a problem for that use case. For the other layers, if we consider detecting the layers feature a problem, we could always mark them as supported and just fallback to geometry, reusing the code we already have in the external browser apps (Note: We wouldn't need to add that fallback geometry code to WebXR/WebGL in Gecko. It would be just responsible for sharing the layer info on the SubmitFrame calls, not creating the final fallback geometry).

Tag Review thread

Manishearth commented 4 years ago

cc @asajeffrey

asajeffrey commented 4 years ago

We're in the process of implementing this for Servo. A benefit I'd add is that it makes it more likely that an webxr implementation can avoid a blit when displaying webvr content on the device.

annevk commented 4 years ago

(See also #218.)