diff options
author | Manish Goregaokar <manishsmail@gmail.com> | 2019-07-08 16:30:02 -0700 |
---|---|---|
committer | Manish Goregaokar <manishsmail@gmail.com> | 2019-07-11 11:12:59 -0700 |
commit | 104a712a28beef693d727170bf25684bb618e5aa (patch) | |
tree | 708487152b358ef3d7f05f15d4e009b266459997 /components/script/dom | |
parent | 877b6c67a1256eda5737f19503d8a71a66f55721 (diff) | |
download | servo-104a712a28beef693d727170bf25684bb618e5aa.tar.gz servo-104a712a28beef693d727170bf25684bb618e5aa.zip |
Remove old RAF code
Diffstat (limited to 'components/script/dom')
-rw-r--r-- | components/script/dom/vrdisplay.rs | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/components/script/dom/vrdisplay.rs b/components/script/dom/vrdisplay.rs index 422ba181410..9f8e1a8f68e 100644 --- a/components/script/dom/vrdisplay.rs +++ b/components/script/dom/vrdisplay.rs @@ -15,7 +15,6 @@ use crate::dom::bindings::codegen::Bindings::WebGLRenderingContextBinding::WebGL use crate::dom::bindings::codegen::Bindings::WindowBinding::FrameRequestCallback; use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods; use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::XRRenderStateInit; -use crate::dom::bindings::codegen::Bindings::XRSessionBinding::XRFrameRequestCallback; use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLLayerMethods; use crate::dom::bindings::error::Error; use crate::dom::bindings::inheritance::Castable; @@ -35,7 +34,6 @@ use crate::dom::vrframedata::VRFrameData; use crate::dom::vrpose::VRPose; use crate::dom::vrstageparameters::VRStageParameters; use crate::dom::webglrenderingcontext::WebGLRenderingContext; -use crate::dom::xrframe::XRFrame; use crate::dom::xrinputsource::XRInputSource; use crate::dom::xrsession::XRSession; use crate::dom::xrwebgllayer::XRWebGLLayer; @@ -79,8 +77,6 @@ pub struct VRDisplay { /// List of request animation frame callbacks #[ignore_malloc_size_of = "closures are hard"] raf_callback_list: DomRefCell<Vec<(u32, Option<Rc<FrameRequestCallback>>)>>, - #[ignore_malloc_size_of = "closures are hard"] - xr_raf_callback_list: DomRefCell<Vec<(u32, Option<Rc<XRFrameRequestCallback>>)>>, /// When there isn't any layer_ctx the RAF thread needs to be "woken up" raf_wakeup_sender: DomRefCell<Option<Sender<()>>>, #[ignore_malloc_size_of = "Rc is hard"] @@ -159,7 +155,6 @@ impl VRDisplay { layer_ctx: MutNullableDom::default(), next_raf_id: Cell::new(1), raf_callback_list: DomRefCell::new(vec![]), - xr_raf_callback_list: DomRefCell::new(vec![]), raf_wakeup_sender: DomRefCell::new(None), pending_renderstate_updates: DomRefCell::new(vec![]), frame_data_status: Cell::new(VRFrameDataStatus::Waiting), @@ -899,22 +894,6 @@ impl VRDisplay { }); } - pub fn xr_raf(&self, callback: Rc<XRFrameRequestCallback>) -> u32 { - let raf_id = self.next_raf_id.get(); - self.next_raf_id.set(raf_id + 1); - self.xr_raf_callback_list - .borrow_mut() - .push((raf_id, Some(callback))); - raf_id - } - - pub fn xr_cancel_raf(&self, handle: i32) { - let mut list = self.xr_raf_callback_list.borrow_mut(); - if let Some(pair) = list.iter_mut().find(|pair| pair.0 == handle as u32) { - pair.1 = None; - } - } - /// Initialize XRInputSources fn initialize_inputs(&self) { if self.initialized_inputs.get() { |