Allow cancelling rAF callbacks from within rAF#1005
Merged
Manishearth merged 2 commits intoimmersive-web:masterfrom Apr 21, 2020
Merged
Allow cancelling rAF callbacks from within rAF#1005Manishearth merged 2 commits intoimmersive-web:masterfrom
Manishearth merged 2 commits intoimmersive-web:masterfrom
Conversation
82e8103 to
9bce468
Compare
toji
approved these changes
Apr 21, 2020
Member
toji
left a comment
There was a problem hiding this comment.
LGTM with one nit and one question
index.bs
Outdated
|
|
||
| 1. Let |session| be the target {{XRSession}} object. | ||
| 1. Find the entry in |session|'s [=list of animation frame callbacks=] that is associated with the value |handle|. | ||
| 1. Find the entry in |session|'s [=list of animation frame callbacks=] and |session|'s [=list of currently running animation frame callbacks=] that is associated with the value |handle|. |
Member
There was a problem hiding this comment.
Nit: This could be an "or", since the value should not exist in both at once.
index.bs
Outdated
| 1. If |session|'s {{XRSession/renderState}}'s {{XRRenderState/baseLayer}} is <code>null</code>, abort these steps. | ||
| 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. | ||
| 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. | ||
| 1. Set |session|'s [=list of currently running animation frame callbacks=] to be a copy of the list of the entries in |session|'s [=list of animation frame callbacks=], in the order in which they were added to the list. |
Member
There was a problem hiding this comment.
What's the reasoning behind the new copy here? We should be able to just move the pointer around, so to speak, right?
Contributor
Author
There was a problem hiding this comment.
Trying to preserve the clause that that list is in order of append, but really that's how lists work anyway so i don't think this is necessary.
Contributor
Author
|
Addressed |
toji
approved these changes
Apr 21, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #923
r? @toji