Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upDirty canvas when exiting immersive sessions #26164
Conversation
highfive
commented
Apr 10, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
Apr 10, 2020
|
r? @jdm |
e96f0eb
to
d146303
|
I think this is also part of the fix for servo/webxr#155 , let me check |
|
Yep, this same trick fixes the other issue. |
|
Unused import warning is breaking the build. |
|
This is dirtying the canvas rather than the document, does it wake up the main thread if the canvas is detached from the DOM? |
46af1a0
to
41474cf
|
Fixed. @asajeffrey hmm. This would have already been broken then, right? That seems to be rooted in embedder events not getting consumed when the thread is asleep. |
| @@ -5,6 +5,7 @@ | |||
| use crate::dom::bindings::cell::DomRefCell; | |||
| use crate::dom::bindings::codegen::Bindings::XRSystemBinding::XRSessionInit; | |||
| use crate::dom::bindings::codegen::Bindings::XRSystemBinding::{XRSessionMode, XRSystemMethods}; | |||
| use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLRenderingContext; | |||
This comment has been minimized.
This comment has been minimized.
jdm
Apr 13, 2020
Member
warning: unused import: `crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLRenderingContext`
--> components\script\dom\xrsystem.rs:8:5
|
8 | use crate::dom::bindings::codegen::Bindings::XRWebGLLayerBinding::XRWebGLRenderingContext;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
Since I don't think #26179 is related to these changes, I think we should go ahead and merge them with the unused import removed. |
41474cf
to
453be48
|
@bors-servo r=jdm |
|
|
Dirty canvas when exiting immersive sessions Fixes #26162, fixes servo/webxr#155 We basically end up in a situation where the main thread is asleep. It's unclear to me why it doesn't wake up after attempts to interact with the screen, but we stopped dirtying the canvas during the immersive session (#26077) so the main thread wasn't awake initially. This is probably not the cleanest fix -- we really should not be ending up in situations where the main thread is perma-asleep -- however, we should be dirtying the canvas after exiting immersive mode _anyway_ since the contents need to be shown to the user, so this fix is still valid, even if it's not fixing the root cause.
|
|
|
@bors-servo retry |
Dirty canvas when exiting immersive sessions Fixes #26162, fixes servo/webxr#155 We basically end up in a situation where the main thread is asleep. It's unclear to me why it doesn't wake up after attempts to interact with the screen, but we stopped dirtying the canvas during the immersive session (#26077) so the main thread wasn't awake initially. This is probably not the cleanest fix -- we really should not be ending up in situations where the main thread is perma-asleep -- however, we should be dirtying the canvas after exiting immersive mode _anyway_ since the contents need to be shown to the user, so this fix is still valid, even if it's not fixing the root cause.
|
|
|
@bors-servo retry |
|
|
Manishearth commentedApr 10, 2020
•
edited
Fixes #26162, fixes servo/webxr#155
We basically end up in a situation where the main thread is asleep. It's unclear to me why it doesn't wake up after attempts to interact with the screen, but we stopped dirtying the canvas during the immersive session (#26077) so the main thread wasn't awake initially.
This is probably not the cleanest fix -- we really should not be ending up in situations where the main thread is perma-asleep -- however, we should be dirtying the canvas after exiting immersive mode anyway since the contents need to be shown to the user, so this fix is still valid, even if it's not fixing the root cause.