mirror of
https://github.com/servo/servo.git
synced 2025-08-04 21:20:23 +01:00
Remove old RAF code
This commit is contained in:
parent
877b6c67a1
commit
104a712a28
1 changed files with 0 additions and 21 deletions
|
@ -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::FrameRequestCallback;
|
||||||
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
use crate::dom::bindings::codegen::Bindings::WindowBinding::WindowMethods;
|
||||||
use crate::dom::bindings::codegen::Bindings::XRRenderStateBinding::XRRenderStateInit;
|
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::codegen::Bindings::XRWebGLLayerBinding::XRWebGLLayerMethods;
|
||||||
use crate::dom::bindings::error::Error;
|
use crate::dom::bindings::error::Error;
|
||||||
use crate::dom::bindings::inheritance::Castable;
|
use crate::dom::bindings::inheritance::Castable;
|
||||||
|
@ -35,7 +34,6 @@ use crate::dom::vrframedata::VRFrameData;
|
||||||
use crate::dom::vrpose::VRPose;
|
use crate::dom::vrpose::VRPose;
|
||||||
use crate::dom::vrstageparameters::VRStageParameters;
|
use crate::dom::vrstageparameters::VRStageParameters;
|
||||||
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
use crate::dom::webglrenderingcontext::WebGLRenderingContext;
|
||||||
use crate::dom::xrframe::XRFrame;
|
|
||||||
use crate::dom::xrinputsource::XRInputSource;
|
use crate::dom::xrinputsource::XRInputSource;
|
||||||
use crate::dom::xrsession::XRSession;
|
use crate::dom::xrsession::XRSession;
|
||||||
use crate::dom::xrwebgllayer::XRWebGLLayer;
|
use crate::dom::xrwebgllayer::XRWebGLLayer;
|
||||||
|
@ -79,8 +77,6 @@ pub struct VRDisplay {
|
||||||
/// List of request animation frame callbacks
|
/// List of request animation frame callbacks
|
||||||
#[ignore_malloc_size_of = "closures are hard"]
|
#[ignore_malloc_size_of = "closures are hard"]
|
||||||
raf_callback_list: DomRefCell<Vec<(u32, Option<Rc<FrameRequestCallback>>)>>,
|
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"
|
/// When there isn't any layer_ctx the RAF thread needs to be "woken up"
|
||||||
raf_wakeup_sender: DomRefCell<Option<Sender<()>>>,
|
raf_wakeup_sender: DomRefCell<Option<Sender<()>>>,
|
||||||
#[ignore_malloc_size_of = "Rc is hard"]
|
#[ignore_malloc_size_of = "Rc is hard"]
|
||||||
|
@ -159,7 +155,6 @@ impl VRDisplay {
|
||||||
layer_ctx: MutNullableDom::default(),
|
layer_ctx: MutNullableDom::default(),
|
||||||
next_raf_id: Cell::new(1),
|
next_raf_id: Cell::new(1),
|
||||||
raf_callback_list: DomRefCell::new(vec![]),
|
raf_callback_list: DomRefCell::new(vec![]),
|
||||||
xr_raf_callback_list: DomRefCell::new(vec![]),
|
|
||||||
raf_wakeup_sender: DomRefCell::new(None),
|
raf_wakeup_sender: DomRefCell::new(None),
|
||||||
pending_renderstate_updates: DomRefCell::new(vec![]),
|
pending_renderstate_updates: DomRefCell::new(vec![]),
|
||||||
frame_data_status: Cell::new(VRFrameDataStatus::Waiting),
|
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
|
/// Initialize XRInputSources
|
||||||
fn initialize_inputs(&self) {
|
fn initialize_inputs(&self) {
|
||||||
if self.initialized_inputs.get() {
|
if self.initialized_inputs.get() {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue