mirror of
https://github.com/servo/servo.git
synced 2025-09-11 23:48:21 +01:00
Pass the event loop waker into WebXR
This commit is contained in:
parent
c9dde3a4bb
commit
701256d837
9 changed files with 17 additions and 19 deletions
|
@ -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) }
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue