diff options
Diffstat (limited to 'components/script/dom/navigator.rs')
-rw-r--r-- | components/script/dom/navigator.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/components/script/dom/navigator.rs b/components/script/dom/navigator.rs index 9121f7ef54d..c813af4ea99 100644 --- a/components/script/dom/navigator.rs +++ b/components/script/dom/navigator.rs @@ -26,7 +26,7 @@ use crate::dom::xr::XR; use dom_struct::dom_struct; use std::cell::RefCell; use std::rc::Rc; -use webgpu::wgpu::AdapterId; +use webgpu::wgpu::{AdapterId, DeviceId}; #[dom_struct] pub struct Navigator { @@ -76,6 +76,10 @@ impl Navigator { pub fn create_adapter_id(&self) -> AdapterId { self.gpu_id_hub.borrow_mut().create_adapter_id() } + + pub fn create_device_id(&self) -> DeviceId { + self.gpu_id_hub.borrow_mut().create_device_id() + } } impl NavigatorMethods for Navigator { |