mirror of
https://github.com/servo/servo.git
synced 2025-07-23 07:13:52 +01:00
Silence unused warnings
This commit is contained in:
parent
feb2a2d3c9
commit
c3b93a967d
5 changed files with 16 additions and 26 deletions
|
@ -2,10 +2,7 @@
|
|||
* 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/. */
|
||||
|
||||
use crate::dom::bindings::codegen::Bindings::XRLayerBinding;
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::root::DomRoot;
|
||||
use crate::dom::globalscope::GlobalScope;
|
||||
use crate::dom::bindings::reflector::Reflector;
|
||||
use dom_struct::dom_struct;
|
||||
|
||||
#[dom_struct]
|
||||
|
@ -19,12 +16,4 @@ impl XRLayer {
|
|||
reflector_: Reflector::new(),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(global: &GlobalScope) -> DomRoot<XRLayer> {
|
||||
reflect_dom_object(
|
||||
Box::new(XRLayer::new_inherited()),
|
||||
global,
|
||||
XRLayerBinding::Wrap,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -21,6 +21,7 @@ impl XRReferenceSpace {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
pub fn new(global: &GlobalScope) -> DomRoot<XRReferenceSpace> {
|
||||
reflect_dom_object(
|
||||
Box::new(XRReferenceSpace::new_inherited()),
|
||||
|
|
|
@ -20,6 +20,7 @@ impl XRRigidTransform {
|
|||
}
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
pub fn new(global: &GlobalScope) -> DomRoot<XRRigidTransform> {
|
||||
reflect_dom_object(
|
||||
Box::new(XRRigidTransform::new_inherited()),
|
||||
|
|
|
@ -14,6 +14,7 @@ pub struct XRStationaryReferenceSpace {
|
|||
xrreferencespace: XRReferenceSpace,
|
||||
}
|
||||
|
||||
#[allow(unused)]
|
||||
impl XRStationaryReferenceSpace {
|
||||
pub fn new_inherited() -> XRStationaryReferenceSpace {
|
||||
XRStationaryReferenceSpace {
|
||||
|
|
|
@ -18,15 +18,13 @@ use crate::dom::xrview::XRView;
|
|||
use crate::dom::xrviewport::XRViewport;
|
||||
use dom_struct::dom_struct;
|
||||
|
||||
use std::cell::Cell;
|
||||
|
||||
#[dom_struct]
|
||||
pub struct XRWebGLLayer {
|
||||
xrlayer: XRLayer,
|
||||
antialias: Cell<bool>,
|
||||
depth: Cell<bool>,
|
||||
stencil: Cell<bool>,
|
||||
alpha: Cell<bool>,
|
||||
antialias: bool,
|
||||
depth: bool,
|
||||
stencil: bool,
|
||||
alpha: bool,
|
||||
context: Dom<WebGLRenderingContext>,
|
||||
session: Dom<XRSession>,
|
||||
}
|
||||
|
@ -39,10 +37,10 @@ impl XRWebGLLayer {
|
|||
) -> XRWebGLLayer {
|
||||
XRWebGLLayer {
|
||||
xrlayer: XRLayer::new_inherited(),
|
||||
antialias: Cell::new(init.antialias),
|
||||
depth: Cell::new(init.depth),
|
||||
stencil: Cell::new(init.stencil),
|
||||
alpha: Cell::new(init.alpha),
|
||||
antialias: init.antialias,
|
||||
depth: init.depth,
|
||||
stencil: init.stencil,
|
||||
alpha: init.alpha,
|
||||
context: Dom::from_ref(context),
|
||||
session: Dom::from_ref(session),
|
||||
}
|
||||
|
@ -74,22 +72,22 @@ impl XRWebGLLayer {
|
|||
impl XRWebGLLayerMethods for XRWebGLLayer {
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-depth
|
||||
fn Depth(&self) -> bool {
|
||||
self.depth.get()
|
||||
self.depth
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-stencil
|
||||
fn Stencil(&self) -> bool {
|
||||
self.stencil.get()
|
||||
self.stencil
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-antialias
|
||||
fn Antialias(&self) -> bool {
|
||||
self.antialias.get()
|
||||
self.antialias
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-alpha
|
||||
fn Alpha(&self) -> bool {
|
||||
self.alpha.get()
|
||||
self.alpha
|
||||
}
|
||||
|
||||
/// https://immersive-web.github.io/webxr/#dom-xrwebgllayer-context
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue