VR Displays are shut down too quickly for link traversal

RESOLVED FIXED in Firefox 55

Status

()

Core
WebVR
RESOLVED FIXED
6 months ago
6 months ago

People

(Reporter: kip, Assigned: kip)

Tracking

unspecified
mozilla55
Points:
---

Firefox Tracking Flags

(firefox55 fixed)

Details

MozReview Requests

()

Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:

Attachments

(1 attachment)

(Assignee)

Description

6 months ago
During link traversal between two VR sites, the code in VRManager::VSync detects that the VR displays are not in use and shuts them down before the next page has a chance to begin VR presentation.

This effectively breaks VR link traversal.
(Assignee)

Comment 1

6 months ago
I have solved this by adding a conservative delay to the code that releases VR displays.  The VR displays now need to be inactive for 30 seconds before the browser will shut them down, rather than shutting them down instantaneously between VR presentations.
Comment hidden (mozreview-request)
(Assignee)

Updated

6 months ago
Attachment #8857260 - Flags: review?(dmu)

Comment 3

6 months ago
mozreview-review
Comment on attachment 8857260 [details]
Bug 1355654 - VRManager will now wait for 30 seconds of inactivity before releasing VR displays, rather than doing it instantaneously.

https://reviewboard.mozilla.org/r/129192/#review131774

r=me after figureing out if we need to leave bHaveActiveDisplay for determining shutdown();

::: gfx/vr/VRManager.cpp:226
(Diff revision 1)
>    }
>  
> -  if (!bHaveEventListener && !bHaveControllerListener && !bHaveActiveDisplay) {
> -    // Shut down the VR devices when not in use
> +  // Shut down the VR devices when not in use
> +  if (bHaveEventListener || bHaveControllerListener || bHaveActiveDisplay) {
> +    // We are using a VR device, keep it alive

I am think if we have the case of bHaveActiveDisplay is true but bHaveEventListener is false. It seems to be impossible? Probably, we just need to check bHaveEventListener and bHaveControllerListener.
Attachment #8857260 - Flags: review?(dmu) → review+
Comment hidden (mozreview-request)
(Assignee)

Comment 5

6 months ago
mozreview-review
Comment on attachment 8857260 [details]
Bug 1355654 - VRManager will now wait for 30 seconds of inactivity before releasing VR displays, rather than doing it instantaneously.

https://reviewboard.mozilla.org/r/129192/#review131818

::: gfx/vr/VRManager.cpp:226
(Diff revision 1)
>    }
>  
> -  if (!bHaveEventListener && !bHaveControllerListener && !bHaveActiveDisplay) {
> -    // Shut down the VR devices when not in use
> +  // Shut down the VR devices when not in use
> +  if (bHaveEventListener || bHaveControllerListener || bHaveActiveDisplay) {
> +    // We are using a VR device, keep it alive

Indeed, we only need to check bHaveEventListener and bHaveControllerListener.  I'll correct this.

Comment 6

6 months ago
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6033ce69f665
VRManager will now wait for 30 seconds of inactivity before releasing VR displays, rather than doing it instantaneously. r=daoshengmu

Comment 7

6 months ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/6033ce69f665
Status: NEW → RESOLVED
Last Resolved: 6 months ago
status-firefox55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.