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 upwebgl: Don't dirty canvas element while in immersive mode. #26077
Conversation
highfive
commented
Mar 31, 2020
|
Heads up! This PR modifies the following files:
|
highfive
commented
Mar 31, 2020
|
r? @Manishearth |
|
LGTM but with a tiny bit of FUD about future interactions with DOMToTexture. |
| // Dirtying the canvas is unnecessary if we're actively displaying immersive | ||
| // XR content right now. | ||
| if self.global().as_window().in_immersive_xr_session() { | ||
| return; |
This comment has been minimized.
This comment has been minimized.
asajeffrey
Mar 31, 2020
Member
I'm a bit worried that when we come to put DOMToTexture nodes into XR sessions, we'll forget that we did this.
|
@bors-servo r=asajeffrey |
|
|
|
|
bors-servo
added a commit
that referenced
this pull request
Apr 13, 2020
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
added a commit
that referenced
this pull request
Apr 13, 2020
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
added a commit
that referenced
this pull request
Apr 14, 2020
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.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
jdm commentedMar 31, 2020
There are various WebGL APIs that are supposed to trigger a frame composite at the end of the event loop when they're used. We enforce this via dirtying the canvas element and ensuring that reflow occurs for normal content. This is redundant when we're using immersive mode and incurs extra work by the layout thread and compositor that inhibits the immersive rendering performance.
./mach build -ddoes not report any errors./mach test-tidydoes not report any errors