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: webxrlayers-1.bs
+10-16Lines changed: 10 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -1334,8 +1334,7 @@ When this method is invoked, the user agent MUST run the following steps:
1334
1334
<dt> Otherwise
1335
1335
<dd> Let [=XRProjectionLayer/depthstenciltextures for secondary views=] be <code>null</code>.
1336
1336
</dl>
1337
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1338
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1337
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1339
1338
1. Return |layer|.
1340
1339
1341
1340
</div>
@@ -1359,8 +1358,7 @@ When this method is invoked, the user agent MUST run the following steps:
1359
1358
1. Initialize |layer|'s {{XRCompositionLayer/needsRedraw}} to <code>true</code>.
1360
1359
1. let |layer|'s [=colorTextures=] be the result of [=allocate color textures|allocating color textures=] with |layer|, |init|'s {{XRQuadLayerInit/textureType}} and |init|.
1361
1360
1. let |layer|'s [=depthStencilTextures=] be the result of [=allocate depth textures|allocating depth textures=] with |layer|, |init|'s {{XRQuadLayerInit/textureType}} and |init|.
1362
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1363
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1361
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1364
1362
1. return |layer|.
1365
1363
1366
1364
</div>
@@ -1384,8 +1382,7 @@ When this method is invoked, the user agent MUST run the following steps:
1384
1382
1. Initialize |layer|'s {{XRCompositionLayer/needsRedraw}} to <code>true</code>.
1385
1383
1. let |layer|'s [=colorTextures=] be the result of [=allocate color textures|allocating color textures=] with |layer|, |init|'s {{XRCylinderLayerInit/textureType}} and |init|.
1386
1384
1. let |layer|'s [=depthStencilTextures=] be the result of [=allocate depth textures|allocating depth textures=] with |layer|, |init|'s {{XRCylinderLayerInit/textureType}} and |init|.
1387
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1388
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1385
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1389
1386
1. return |layer|.
1390
1387
1391
1388
</div>
@@ -1411,8 +1408,7 @@ When this method is invoked, the user agent MUST run the following steps:
1411
1408
1. Initialize |layer|'s {{XRCompositionLayer/needsRedraw}} to <code>true</code>.
1412
1409
1. let |layer|'s [=colorTextures=] be the result of [=allocate color textures|allocating color textures=] with |layer|, |init|'s {{XRCylinderLayerInit/textureType}} and |init|.
1413
1410
1. let |layer|'s [=depthStencilTextures=] be the result of [=allocate depth textures|allocating depth textures=] with |layer|, |init|'s {{XRCylinderLayerInit/textureType}} and |init|.
1414
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1415
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1411
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1416
1412
1. return |layer|.
1417
1413
1418
1414
</div>
@@ -1462,8 +1458,7 @@ When this method is invoked, the user agent MUST run the following steps:
1462
1458
<dt> Otherwise
1463
1459
<dd> Initialize [=depthStencilTextures=] with 2 [=new=] instances of an [=opaque texture=] in the [=relevant realm=] of this {{XRCubeLayer}} created as a {{TEXTURE_CUBE_MAP}} texture with |context| and |init|'s {{XRLayerInit/depthFormat}}, {{XRLayerInit/viewPixelWidth}} and {{XRLayerInit/viewPixelHeight}} values.
1464
1460
</dl>
1465
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1466
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1461
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1467
1462
1. return |layer|.
1468
1463
1469
1464
</div>
@@ -1521,6 +1516,7 @@ When this method is invoked on an {{XRWebGLBinding}} |binding|, it MUST run the
1521
1516
<dd> Let |subimage| be a [=new=]{{XRWebGLSubImage}} in the [=relevant realm=] of [=this=].
1522
1517
<dd> Let |subimage|'s {{XRSubImage/viewport}} be a [=new=]{{XRViewport}} in the [=relevant realm=] of [=this=].
1523
1518
</dl>
1519
+
1. If |layer| is not in the |session|'s {{XRRenderState/layers}} array, throw a {{TypeError}} and abort these steps.
1524
1520
1. If |layer|'s type is {{XRProjectionLayer}}, throw a {{TypeError}} and abort these steps.
1525
1521
1. If |layer|'s {{XRCompositionLayer/layout}} attribute is {{XRLayerLayout/"default"}}, throw a {{TypeError}} and abort these steps.
1526
1522
1. Let |index| be <code>0</code>.
@@ -1579,6 +1575,7 @@ When this method is invoked on an {{XRWebGLBinding}} |binding|, it MUST run the
1579
1575
1. Let |frame| be |view|'s {{frame}}.
1580
1576
1. Let |session| be [=this=][=XRWebGLBinding/session=].
1581
1577
1. If [=validate the state of the XRWebGLSubImage creation function=] with |layer| and |frame| is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
1578
+
1. If |layer| is not in the |session|'s {{XRRenderState/layers}} array, throw a {{TypeError}} and abort these steps.
1582
1579
1. If |view|'s [=view/active=] flag is <code>false</code>, throw an {{InvalidStateError}} and abort these steps.
1583
1580
1. Initialize |index| as follows:
1584
1581
<dl class="switch">
@@ -1791,8 +1788,7 @@ When this method is invoked, the user agent MUST run the following steps:
1791
1788
1. If |init|'s {{XRMediaQuadLayerInit/height}} is <code>undefined</code>, set {{XRMediaQuadLayerInit/height}} to {{XRMediaQuadLayerInit/width}} divided by |aspectRatio|.
1792
1789
1. If |init|'s {{XRMediaQuadLayerInit/width}} is <code>undefined</code>, set {{XRMediaQuadLayerInit/width}} to {{XRMediaQuadLayerInit/height}} multiplied by |aspectRatio|.
1793
1790
1. Run [=initialize a quad layer=] with |layer| and |init|.
1794
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1795
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1791
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1796
1792
1. return |layer|.
1797
1793
1798
1794
</div>
@@ -1813,8 +1809,7 @@ When this method is invoked, the user agent MUST run the following steps:
1813
1809
1. Let |aspectRatio| be the result of [=calculate the aspect ratio=] with |video| and |init|'s {{XRMediaLayerInit/layout}}.
1814
1810
1. If |init|'s {{XRMediaCylinderLayerInit/aspectRatio}} is <code>undefined</code>, set {{XRMediaCylinderLayerInit/aspectRatio}} to |aspectRatio|.
1815
1811
1. Run [=initialize a cylinder layer=] with |layer| and |init|.
1816
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1817
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1812
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
1818
1813
1. return |layer|.
1819
1814
1820
1815
</div>
@@ -1835,8 +1830,7 @@ When this method is invoked, the user agent MUST run the following steps:
1835
1830
1. Initialize |layer|'s [=XRCompositionLayer/media=] to |video|.
1836
1831
1. Initialize |layer|'s {{XRCompositionLayer/needsRedraw}} to <code>false</code>.
1837
1832
1. Run [=initialize a equirect layer=] with |layer| and |init|.
1838
-
1. Allocate and initialize resources compatible with |session|'s [=/XR device=], including GPU accessible memory buffers, as required to support the compositing of |layer|.
1839
-
1. If |layer|’s resources were unable to be created for any reason, throw an {{OperationError}} and abort these steps.
1833
+
1. If the [=XR Compositor=] knows that it will be unable to create the resources for the |layer| for any reason, throw an {{OperationError}} and abort these steps.
0 commit comments