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
Each {{XRFrameRequestCallback}} object has a <dfn for="XRFrameRequestCallback">cancelled</dfn> boolean initially set to <code>false</code>.
859
859
860
-
Each {{XRSession}} has a <dfn>list of animation frame callbacks</dfn>, which is initially empty, and an <dfn>animation frame callback identifier</dfn>, which is a number which is initially zero.
860
+
Each {{XRSession}} has a <dfn>list of animation frame callbacks</dfn>, which is initially empty, a <dfn>list of currently running animation frame callbacks</dfn>, which is also initially empty, and an <dfn>animation frame callback identifier</dfn>, which is a number which is initially zero.
@@ -879,7 +879,7 @@ The <dfn method for="XRSession">cancelAnimationFrame(|handle|)</dfn> method canc
879
879
When this method is invoked, the user agent MUST run the following steps:
880
880
881
881
1. Let |session| be the target {{XRSession}} object.
882
-
1. Find the entry in |session|'s [=list of animation frame callbacks=] that is associated with the value |handle|.
882
+
1. Find the entry in |session|'s [=list of animation frame callbacks=] or |session|'s [=list of currently running animation frame callbacks=]that is associated with the value |handle|.
883
883
1. If there is such an entry, set its [=cancelled=] boolean to <code>true</code> and remove it from |session|'s [=list of animation frame callbacks=].
884
884
885
885
</div>
@@ -892,15 +892,16 @@ When an {{XRSession}} |session| receives updated [=viewer=] state for timestamp
892
892
1. If |session|'s [=pending render state=] is not <code>null</code>, [=apply the pending render state=].
893
893
1. If |session|'s {{XRSession/renderState}}'s {{XRRenderState/baseLayer}} is <code>null</code>, abort these steps.
894
894
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.
895
-
1. Let |callbacks| be a list of the entries in |session|'s [=list of animation frame callback=], in the order in which they were added to the list.
895
+
1. Set |session|'s [=list of currently running animation frame callbacks=] to be |session|'s [=list of animation frame callbacks=].
896
896
1. Set |session|'s [=list of animation frame callbacks=] to the empty list.
897
897
1. Set |frame|'s [=active=] boolean to <code>true</code>.
898
898
1. Set |frame|'s [=animationFrame=] boolean to <code>true</code>.
899
899
1. [=XRFrame/Apply frame updates=] for |frame|.
900
-
1. For each entry in |callbacks|, in order:
901
-
1. If the entry's [=cancelled=] boolean is <code>true</code>, continue to the next entry.
902
-
1. [=Invoke the Web IDL callback function=], passing |now| and |frame| as the arguments
900
+
1. For each |entry| in |session|'s [=list of currently running animation frame callbacks=], in order:
901
+
1. If the |entry|'s [=cancelled=] boolean is <code>true</code>, continue to the next entry.
902
+
1. [=Invoke the Web IDL callback function=] for |entry|, passing |now| and |frame| as the arguments
903
903
1. If an exception is thrown, [=report the exception=].
904
+
1. Set |session|'s [=list of currently running animation frame callbacks=] to the empty [=/list=].
904
905
1. Set |frame|'s [=active=] boolean to <code>false</code>.
0 commit comments