mirror of
https://github.com/servo/servo.git
synced 2025-08-06 06:00:15 +01:00
Remove WebVR
This commit is contained in:
parent
d8781c1054
commit
c611e46381
74 changed files with 97 additions and 3178 deletions
|
@ -44,6 +44,7 @@ use js::rust::wrappers::JS_HasPropertyById;
|
|||
use js::rust::wrappers::JS_SetProperty;
|
||||
use js::rust::{get_object_class, is_dom_class, GCMethods, ToString, ToWindowProxyIfWindow};
|
||||
use js::rust::{Handle, HandleId, HandleObject, HandleValue, MutableHandleValue};
|
||||
use js::typedarray::{CreateWith, Float32Array};
|
||||
use js::JS_CALLEE;
|
||||
use malloc_size_of::{MallocSizeOf, MallocSizeOfOps};
|
||||
use std::ffi::CString;
|
||||
|
@ -134,6 +135,15 @@ pub fn to_frozen_array<T: ToJSValConvertible>(convertibles: &[T], cx: SafeJSCont
|
|||
*ports
|
||||
}
|
||||
|
||||
/// Creates a Float32 array
|
||||
pub fn create_typed_array(cx: SafeJSContext, src: &[f32], dst: &Heap<*mut JSObject>) {
|
||||
rooted!(in (*cx) let mut array = ptr::null_mut::<JSObject>());
|
||||
unsafe {
|
||||
let _ = Float32Array::create(*cx, CreateWith::Slice(src), array.handle_mut());
|
||||
}
|
||||
(*dst).set(array.get());
|
||||
}
|
||||
|
||||
/// Returns the ProtoOrIfaceArray for the given global object.
|
||||
/// Fails if `global` is not a DOM global object.
|
||||
pub fn get_proto_or_iface_array(global: *mut JSObject) -> *mut ProtoOrIfaceArray {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue