mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
WedIDL: bring dom/bindings/typedarray further in line with spec (#31375)
* WedIDL: bring dom/bindings/typedarray further in line with spec Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * Rename HeapBufferSourceTypes to HeapBufferSource Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> * fmt code Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com> --------- Signed-off-by: Bentaimia Haddadi <haddadi.taym@gmail.com>
This commit is contained in:
parent
32f1d07323
commit
d0b663800f
15 changed files with 505 additions and 317 deletions
|
@ -7,7 +7,7 @@ use euclid::RigidTransform3D;
|
|||
use js::typedarray::{Float32, Float32Array};
|
||||
use webxr_api::{ApiSpace, View};
|
||||
|
||||
use super::bindings::typedarrays::HeapTypedArray;
|
||||
use super::bindings::buffer_source::HeapBufferSource;
|
||||
use crate::dom::bindings::codegen::Bindings::XRViewBinding::{XREye, XRViewMethods};
|
||||
use crate::dom::bindings::reflector::{reflect_dom_object, Reflector};
|
||||
use crate::dom::bindings::root::{Dom, DomRoot};
|
||||
|
@ -23,7 +23,7 @@ pub struct XRView {
|
|||
eye: XREye,
|
||||
viewport_index: usize,
|
||||
#[ignore_malloc_size_of = "mozjs"]
|
||||
proj: HeapTypedArray<Float32>,
|
||||
proj: HeapBufferSource<Float32>,
|
||||
#[ignore_malloc_size_of = "defined in rust-webxr"]
|
||||
#[no_trace]
|
||||
view: View<ApiSpace>,
|
||||
|
@ -43,7 +43,7 @@ impl XRView {
|
|||
session: Dom::from_ref(session),
|
||||
eye,
|
||||
viewport_index,
|
||||
proj: HeapTypedArray::default(),
|
||||
proj: HeapBufferSource::default(),
|
||||
view,
|
||||
transform: Dom::from_ref(transform),
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ impl XRViewMethods for XRView {
|
|||
.expect("Failed to set projection matrix.")
|
||||
}
|
||||
self.proj
|
||||
.get_internal()
|
||||
.get_buffer()
|
||||
.expect("Failed to get projection matrix.")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue