Pass the event loop waker into WebXR

This commit is contained in:
Alan Jeffrey 2019-07-24 13:48:25 -05:00
parent c9dde3a4bb
commit 701256d837
9 changed files with 17 additions and 19 deletions

View file

@ -87,7 +87,7 @@ impl EventLoopWaker for HeadedEventLoopWaker {
warn!("Failed to wake up event loop ({}).", err);
}
}
fn clone(&self) -> Box<dyn EventLoopWaker + Send> {
fn clone_box(&self) -> Box<dyn EventLoopWaker> {
Box::new(HeadedEventLoopWaker {
proxy: self.proxy.clone(),
})
@ -97,5 +97,5 @@ impl EventLoopWaker for HeadedEventLoopWaker {
struct HeadlessEventLoopWaker;
impl EventLoopWaker for HeadlessEventLoopWaker {
fn wake(&self) {}
fn clone(&self) -> Box<dyn EventLoopWaker + Send> { Box::new(HeadlessEventLoopWaker) }
fn clone_box(&self) -> Box<dyn EventLoopWaker> { Box::new(HeadlessEventLoopWaker) }
}

View file

@ -403,7 +403,7 @@ enum ScrollState {
struct EventLoopWakerInstance;
impl EventLoopWaker for EventLoopWakerInstance {
fn clone(&self) -> Box<dyn EventLoopWaker + Send> {
fn clone_box(&self) -> Box<dyn EventLoopWaker> {
Box::new(EventLoopWakerInstance)
}

View file

@ -373,7 +373,7 @@ impl WakeupCallback {
}
impl EventLoopWaker for WakeupCallback {
fn clone(&self) -> Box<dyn EventLoopWaker + Send> {
fn clone_box(&self) -> Box<dyn EventLoopWaker> {
Box::new(WakeupCallback(self.0))
}
fn wake(&self) {

View file

@ -339,7 +339,7 @@ impl WakeupCallback {
}
impl EventLoopWaker for WakeupCallback {
fn clone(&self) -> Box<dyn EventLoopWaker + Send> {
fn clone_box(&self) -> Box<dyn EventLoopWaker> {
Box::new(WakeupCallback {
callback: self.callback.clone(),
jvm: self.jvm.clone(),