mirror of
https://github.com/servo/servo.git
synced 2025-08-05 13:40:08 +01:00
webgl: Don't dirty canvas element while in immersive mode.
This commit is contained in:
parent
148c24c29c
commit
ab75808b8c
3 changed files with 18 additions and 0 deletions
|
@ -2225,6 +2225,14 @@ impl Window {
|
|||
pub fn webrender_document(&self) -> DocumentId {
|
||||
self.webrender_document
|
||||
}
|
||||
|
||||
pub fn in_immersive_xr_session(&self) -> bool {
|
||||
self.navigator
|
||||
.get()
|
||||
.as_ref()
|
||||
.and_then(|nav| nav.xr())
|
||||
.map_or(false, |xr| xr.pending_or_active_session())
|
||||
}
|
||||
}
|
||||
|
||||
impl Window {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue