You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+14-2Lines changed: 14 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -940,7 +940,13 @@ NOTE: The <a href="https://immersive-web.github.io/layers">WebXR layers module</
940
940
When an {{XRSession}} |session| receives updated [=viewer=] state for timestamp |frameTime| from the [=XRSession/XR device=], it runs an <dfn>XR animation frame</dfn>, which MUST run the following steps regardless of if the [=list of animation frame callbacks=] is empty or not:
941
941
942
942
1. Let |now| be the [=current high resolution time=].
943
-
1. Let |frame| be a [=new=]{{XRFrame}} with [=XRFrame/time=] |frameTime| and {{XRFrame/session}} |session| in the [=relevant realm=] of |session|.
943
+
1. Initialize |frame| as follows:
944
+
<dl class="switch">
945
+
<dt>If |session| has previously run an [=XR animation frame=], the user agent MUST:</dt>
946
+
<dd>Let |frame| be the same {{XRFrame}} object created by the earlier [=XR animation frame=]</dd>
947
+
<dt>Otherwise:</dt>
948
+
<dd>Let |frame| be a [=new=]{{XRFrame}} with [=XRFrame/time=] |frameTime| and {{XRFrame/session}} |session| in the [=relevant realm=] of |session|.</dd>
949
+
</dl>
944
950
1. If |session|'s [=pending render state=] is not <code>null</code>, [=apply the pending render state=].
945
951
1. If [=check the layers state=] with |session|'s {{XRSession/renderState}} is <code>false</code>, abort these steps.
946
952
1. If |session|'s [=XRSession/mode=] is {{XRSessionMode/"inline"}} and |session|'s {{XRSession/renderState}}'s [=XRRenderState/output canvas=] is <code>null</code>, abort these steps.
@@ -1959,7 +1965,13 @@ The <dfn method for="XRWebGLLayer">getViewport(|view|)</dfn> method, when invoke
1959
1965
1. If |frame|'s {{XRFrame/session}} is not equal to |layer|'s [=XRWebGLLayer/session=], throw an {{InvalidStateError}} and abort these steps.
1960
1966
1. If |frame|'s [=XRFrame/active=] boolean is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
1961
1967
1. Let |glViewport| be the [=WebGL viewport=] from the [=list of viewports=] associated with |view|.
1962
-
1. Let |viewport| be a [=new=]{{XRViewport}} in the [=relevant realm=] of |layer|'s [=XRWebGLLayer/session=].
1968
+
1. Initialize |viewport| as follows:
1969
+
<dl class="switch">
1970
+
<dt>If a |view| with the same underlying [=view=] has been passed to a getViewport() call previously, and |glViewport| has not changed since then, the user agent MUST:</dt>
1971
+
<dd>Let |viewport| be the same {{XRViewport}} object returned by the earlier call to {{XRWebGLLayer/getViewport()}}</dd>
1972
+
<dt>Otherwise:</dt>
1973
+
<dd>Let |viewport| be a [=new=]{{XRViewport}} in the [=relevant realm=] of |layer|'s [=XRWebGLLayer/session=].</dd>
1974
+
</dl>
1963
1975
1. Initialize |viewport|'s {{XRViewport/x}} to |glViewport|'s <code>x</code> component.
1964
1976
1. Initialize |viewport|'s {{XRViewport/y}} to |glViewport|'s <code>y</code> component.
1965
1977
1. Initialize |viewport|'s {{XRViewport/width}} to |glViewport|'s <code>width</code>.
0 commit comments