Skip to content

Allow caching various objects (take 2) #1088

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 26, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Allow caching XRFrames
  • Loading branch information
Manishearth committed Jun 26, 2020
commit deb62365e284d5192efb577565ed5eae26bfa15e
8 changes: 7 additions & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,13 @@ NOTE: The <a href="https://immersive-web.github.io/layers">WebXR layers module</
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:

1. Let |now| be the [=current high resolution time=].
1. Let |frame| be a [=new=] {{XRFrame}} with [=XRFrame/time=] |frameTime| and {{XRFrame/session}} |session| in the [=relevant realm=] of |session|.
1. Initialize |frame| as follows:
<dl class="switch">
<dt>If |session| has previously run an [=XR animation frame=], the user agent MUST:</dt>
<dd>Let |frame| be the same {{XRFrame}} object created by the earlier [=XR animation frame=]</dd>
<dt>Otherwise:</dt>
<dd>Let |frame| be a [=new=] {{XRFrame}} with [=XRFrame/time=] |frameTime| and {{XRFrame/session}} |session| in the [=relevant realm=] of |session|.</dd>
</dl>
1. If |session|'s [=pending render state=] is not <code>null</code>, [=apply the pending render state=].
1. If [=check the layers state=] with |session|'s {{XRSession/renderState}} is <code>false</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.
Expand Down