Skip to content

Commit

Permalink
Fix thread of Windows exit/enter immersive calls. Avoid superfluos ca…
Browse files Browse the repository at this point in the history
…ll. (#3142)

* Avoid superfluous call to ResumeCompositor

* Dispatch Windows (and internal Gecko) calls in the correct thread
  • Loading branch information
MortimerGoro committed Apr 9, 2020
1 parent 2d38f82 commit cd7e648
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Expand Up @@ -961,7 +961,8 @@ void pauseGeckoViewCompositor() {
return;
}
mIsPresentingImmersive = true;
mWindows.enterImmersiveMode();
runOnUiThread(() -> mWindows.enterImmersiveMode());

TelemetryWrapper.startImmersive();
GleanMetricsService.startImmersive();
PauseCompositorRunnable runnable = new PauseCompositorRunnable();
Expand All @@ -985,7 +986,8 @@ void resumeGeckoViewCompositor() {
return;
}
mIsPresentingImmersive = false;
mWindows.exitImmersiveMode();
runOnUiThread(() -> mWindows.exitImmersiveMode());

// Show the window in front of you when you exit immersive mode.
resetUIYaw();

Expand Down
2 changes: 1 addition & 1 deletion app/src/main/cpp/ExternalVR.cpp
Expand Up @@ -127,7 +127,7 @@ struct ExternalVR::State {
vrb::Vector eyeOffsets[device::EyeCount];
uint64_t lastFrameId = 0;
bool firstPresentingFrame = false;
bool compositorEnabled = false;
bool compositorEnabled = true;
bool waitingForExit = false;

State() {
Expand Down

0 comments on commit cd7e648

Please sign in to comment.