Skip to content

Commit

Permalink
Short circuit updateRenderState() if no render state is passed
Browse files Browse the repository at this point in the history
  • Loading branch information
Manishearth committed May 11, 2020
1 parent b623bb6 commit 5825859
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -664,11 +664,11 @@ NOTE: The <a href="https://immersive-web.github.io/layers">WebXR layers module</
The <dfn method for="XRSession">updateRenderState(|newState|)</dfn> method queues an update to the [=active render state=] to be applied on the next frame. Unset fields of the {{XRRenderStateInit}} |newState| passed to this method will not be changed.

When this method is invoked, the user agent MUST run the following steps:

1. Let |session| be the target {{XRSession}}.
1. If |session|'s [=ended=] value is <code>true</code>, throw an {{InvalidStateError}} and abort these steps.
1. If |newState|'s {{XRRenderStateInit/baseLayer}} was created with an {{XRSession}} other than |session|, throw an {{InvalidStateError}} and abort these steps.
1. If |newState|'s {{XRRenderStateInit/inlineVerticalFieldOfView}} is set and |session| is an [=immersive session=], throw an {{InvalidStateError}} and abort these steps.
1. If none of |newState|'s {{XRRenderStateInit/depthNear}}, {{XRRenderStateInit/depthFar}}, {{XRRenderStateInit/inlineVerticalFieldOfView}}, {{XRRenderStateInit/baseLayer}}, {{XRRenderStateInit/layers}} are set, abort these steps.
1. Run [=update the pending layers state=] with |session| and |newState|.
1. Let |activeState| be |session|'s [=active render state=].
1. If |session|'s [=pending render state=] is <code>null</code>, set it to a copy of |activeState|.
Expand Down

0 comments on commit 5825859

Please sign in to comment.