mirror of
https://github.com/servo/servo.git
synced 2025-08-05 21:50:18 +01:00
Auto merge of #27499 - asajeffrey:webxr-xrmedia-dummy, r=Manishearth
Add dummy implementations of missing XR layer types <!-- Please describe your changes on the following line: --> Add dummy implementations of the missing layer types, and the functions that create them. --- <!-- Thank you for contributing to Servo! Please replace each `[ ]` by `[X]` when the step is complete, and replace `___` with appropriate data: --> - [x] `./mach build -d` does not report any errors - [x] `./mach test-tidy` does not report any errors - [x] There are tests for these changes <!-- Also, please make sure that "Allow edits from maintainers" checkbox is checked, so that we can help you if you get stuck somewhere along the way.--> <!-- Pull requests that do not address these steps are welcome, but they will require additional verification as part of the review process. -->
This commit is contained in:
commit
f8c8307f94
21 changed files with 367 additions and 89 deletions
20
components/script/dom/webidls/XRCompositionLayer.webidl
Normal file
20
components/script/dom/webidls/XRCompositionLayer.webidl
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrcompositionlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRCompositionLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
//
|
||||
// attribute boolean blendTextureSourceAlpha;
|
||||
// attribute boolean? chromaticAberrationCorrection;
|
||||
// attribute float? fixedFoveation;
|
||||
//
|
||||
// readonly attribute boolean needsRedraw;
|
||||
//
|
||||
// void destroy();
|
||||
};
|
17
components/script/dom/webidls/XRCubeLayer.webidl
Normal file
17
components/script/dom/webidls/XRCubeLayer.webidl
Normal file
|
@ -0,0 +1,17 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrcubelayer
|
||||
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRCubeLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute DOMPointReadOnly orientation;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
20
components/script/dom/webidls/XRCylinderLayer.webidl
Normal file
20
components/script/dom/webidls/XRCylinderLayer.webidl
Normal file
|
@ -0,0 +1,20 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrcylinderlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRCylinderLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralAngle;
|
||||
// attribute float aspectRatio;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
21
components/script/dom/webidls/XREquirectLayer.webidl
Normal file
21
components/script/dom/webidls/XREquirectLayer.webidl
Normal file
|
@ -0,0 +1,21 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrequirectlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XREquirectLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralHorizontalAngle;
|
||||
// attribute float upperVerticalAngle;
|
||||
// attribute float lowerVerticalAngle;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
|
@ -5,71 +5,3 @@
|
|||
// https://immersive-web.github.io/webxr/#xrlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.enabled"]
|
||||
interface XRLayer : EventTarget {};
|
||||
|
||||
// TODO: Implement the layer types
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCompositionLayer : XRLayer {
|
||||
// readonly attribute XRLayerLayout layout;
|
||||
//
|
||||
// attribute boolean blendTextureSourceAlpha;
|
||||
// attribute boolean? chromaticAberrationCorrection;
|
||||
// attribute float? fixedFoveation;
|
||||
//
|
||||
// readonly attribute boolean needsRedraw;
|
||||
//
|
||||
// void destroy();
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRProjectionLayer : XRCompositionLayer {
|
||||
// readonly attribute boolean ignoreDepthValues;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRQuadLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float width;
|
||||
// attribute float height;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCylinderLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralAngle;
|
||||
// attribute float aspectRatio;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XREquirectLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float radius;
|
||||
// attribute float centralHorizontalAngle;
|
||||
// attribute float upperVerticalAngle;
|
||||
// attribute float lowerVerticalAngle;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
//
|
||||
// [SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
// interface XRCubeLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute DOMPointReadOnly orientation;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
// };
|
||||
|
|
|
@ -5,11 +5,11 @@
|
|||
// https://immersive-web.github.io/layers/#xrmediabindingtype
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRMediaBinding {
|
||||
constructor(XRSession session);
|
||||
[Throws] constructor(XRSession session);
|
||||
|
||||
// XRQuadLayer createQuadVideoLayer(HTMLVideoElement video, optional XRMediaLayerInit init = {});
|
||||
// XRCylinderLayer createCylinderVideoLayer(HTMLVideoElement video, optional XRMediaLayerInit init = {});
|
||||
// XREquirectLayer createEquirectVideoLayer(HTMLVideoElement video, optional XRMediaLayerInit init = {});
|
||||
[Throws] XRQuadLayer createQuadLayer(HTMLVideoElement video, XRMediaLayerInit init);
|
||||
[Throws] XRCylinderLayer createCylinderLayer(HTMLVideoElement video, XRMediaLayerInit init);
|
||||
[Throws] XREquirectLayer createEquirectLayer(HTMLVideoElement video, XRMediaLayerInit init);
|
||||
};
|
||||
|
||||
dictionary XRMediaLayerInit {
|
||||
|
|
12
components/script/dom/webidls/XRProjectionLayer.webidl
Normal file
12
components/script/dom/webidls/XRProjectionLayer.webidl
Normal file
|
@ -0,0 +1,12 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrprojectionlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRProjectionLayer : XRCompositionLayer {
|
||||
// readonly attribute boolean ignoreDepthValues;
|
||||
};
|
19
components/script/dom/webidls/XRQuadLayer.webidl
Normal file
19
components/script/dom/webidls/XRQuadLayer.webidl
Normal file
|
@ -0,0 +1,19 @@
|
|||
/* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
|
||||
|
||||
// TODO: Implement the layer types
|
||||
// https://github.com/servo/servo/issues/27493
|
||||
|
||||
// https://immersive-web.github.io/layers/#xrquadlayer
|
||||
[SecureContext, Exposed=Window, Pref="dom.webxr.layers.enabled"]
|
||||
interface XRQuadLayer : XRCompositionLayer {
|
||||
// attribute XRSpace space;
|
||||
// attribute XRRigidTransform transform;
|
||||
//
|
||||
// attribute float width;
|
||||
// attribute float height;
|
||||
//
|
||||
// // Events
|
||||
// attribute EventHandler onredraw;
|
||||
};
|
|
@ -9,18 +9,18 @@ interface XRWebGLBinding {
|
|||
|
||||
// readonly attribute double nativeProjectionScaleFactor;
|
||||
|
||||
// XRProjectionLayer createProjectionLayer(XRTextureType textureType,
|
||||
// optional XRProjectionLayerInit init);
|
||||
// XRQuadLayer createQuadLayer(XRTextureType textureType,
|
||||
// optional XRQuadLayerInit init);
|
||||
// XRCylinderLayer createCylinderLayer(XRTextureType textureType,
|
||||
// optional XRCylinderLayerInit init);
|
||||
// XREquirectLayer createEquirectLayer(XRTextureType textureType,
|
||||
// optional XREquirectLayerInit init);
|
||||
// XRCubeLayer createCubeLayer(optional XRCubeLayerInit init);
|
||||
[Throws] XRProjectionLayer createProjectionLayer(XRTextureType textureType,
|
||||
optional XRProjectionLayerInit init = {});
|
||||
[Throws] XRQuadLayer createQuadLayer(XRTextureType textureType,
|
||||
optional XRQuadLayerInit init);
|
||||
[Throws] XRCylinderLayer createCylinderLayer(XRTextureType textureType,
|
||||
optional XRCylinderLayerInit init);
|
||||
[Throws] XREquirectLayer createEquirectLayer(XRTextureType textureType,
|
||||
optional XREquirectLayerInit init);
|
||||
[Throws] XRCubeLayer createCubeLayer(optional XRCubeLayerInit init);
|
||||
|
||||
// XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
|
||||
// XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
|
||||
[Throws] XRWebGLSubImage getSubImage(XRCompositionLayer layer, XRFrame frame, optional XREye eye = "none");
|
||||
[Throws] XRWebGLSubImage getViewSubImage(XRProjectionLayer layer, XRView view);
|
||||
};
|
||||
|
||||
dictionary XRProjectionLayerInit {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue