[Webkit-unassigned] [Bug 221225] Implement WebXR getViewerPose and getPose

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Feb 16 04:39:10 PST 2021


https://bugs.webkit.org/show_bug.cgi?id=221225

--- Comment #14 from Imanol Fernandez <ifernandez at igalia.com> ---
(In reply to youenn fablet from comment #13)
> (In reply to Imanol Fernandez from comment #12)
> > (In reply to youenn fablet from comment #10)
> > > WebXRSpace was previously taking a Ref<WebXRSession> and this patch is
> > > changing it to a WeakPtr<WebXRSession>.
> > > With this change, WebXRSpace needs to handle the case of a null
> > > WebXRSession, while previously, it was not possible. Can you describe why
> > > this is good to do so?
> > > 
> > > Are we getting closer to spec? It seems this particular change could
> > > potentially be observable (before GC, WebXRSpace does something, after GC it
> > > does something different).
> > 
> > I made the change when I added
> > https://immersive-web.github.io/webxr/#xrsession-viewer-reference-space in
> > order to avoid a cycle between Session and the viewer reference space.
> 
> From the spec I can see:
> - Each XRSpace has a session which is set to the XRSession that created the
> XRSpace.
> - Each XRSession has a viewer reference space, which is an XRReferenceSpace
> of type "viewer" with an identity transform origin offset.
> 
> It seems that as long as XRSpace is alive, its XRSession should be alive.
> If XRSpace is never changing of XRSession, one possibility is to have:
> - XRSession is RefCounted<XRSession>
> - XRSpace is no longer a RefCounted<XRSpace>
> - XRSpace stores a XRSession&
> - XRSpace implements its ref/deref methods by calling ref/deref of its
> XRSession.

That's a good option. I'm going to update the patch

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20210216/5a499347/attachment-0001.htm>


More information about the webkit-unassigned mailing list