Closed Bug 1318468 Opened 8 years ago Closed 8 years ago

[webvr] controller updates slow

Categories

(Firefox :: General, defect)

53 Branch
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Firefox 53
Tracking Status
firefox53 --- fixed

People

(Reporter: caseyyee.ca, Assigned: kip)

Details

(Whiteboard: [webvr])

Attachments

(1 file)

Examples:

https://webvr.info/samples/XX-vr-controllers.html

and

https://threejs.org/examples/?q=webvr#webvr_vive_dragging

The controllers render in a visible stutter and lower frame-rate than the rest of the scene.
Flags: needinfo?(dmu)
Whiteboard: [webvr]
I will spend time in investigating it. How is the HMD pose? I do the same way as it. I poll the events at the compositing VSync time. I am wondering if we should use shared memory to instead of IPC, but currently we can't use multi-process. That sounds IPC shouldn't be the issue.
Flags: needinfo?(dmu)
In our current architecture, we pass the new event of a controller down through an IPC channel. It would have a lot of data, especially for a GamepadPose. Therefore, it might be a bottleneck in the IPC system.
Moreover, we are using async protocol for updating the gamepad states to notify the Content process from the Chrome process via IPC. In this way, we might get some latency and our data is always from the "last frame" instead of the current frame.

The interesting thing is our HMD pose also uses IPC but a sync protocol to pull the FrameData from VRManagerParent, however, we didn't notice too much latency.

But, anyway, in my humble opinion, shared memory could be the best solution for this topic.
Assignee: nobody → kgilbert
Attachment #8815882 - Flags: review?(dmu)
Comment on attachment 8815882 [details]
Bug 1318468 - Update VR controller inputs on every VR Vsync rather than every 2D vsync

https://reviewboard.mozilla.org/r/96682/#review96922

LGTM. Sorry for I put HandleInput() at the wrong place.
Attachment #8815882 - Flags: review?(dmu) → review+
(In reply to Daosheng Mu[:daoshengmu] from comment #4)
> Comment on attachment 8815882 [details]
> Bug 1318468 - Update VR controller inputs on every VR Vsync rather than
> every 2D vsync
> 
> https://reviewboard.mozilla.org/r/96682/#review96922
> 
> LGTM. Sorry for I put HandleInput() at the wrong place.

With this small change, your controller support works very smoothly, great work!
Pushed by kgilbert@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/766c351e8172
Update VR controller inputs on every VR Vsync rather than every 2D vsync r=daoshengmu
https://hg.mozilla.org/mozilla-central/rev/766c351e8172
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 53
(In reply to :kip (Kearwood Gilbert) from comment #5)
> (In reply to Daosheng Mu[:daoshengmu] from comment #4)
> > Comment on attachment 8815882 [details]
> > Bug 1318468 - Update VR controller inputs on every VR Vsync rather than
> > every 2D vsync
> > 
> > https://reviewboard.mozilla.org/r/96682/#review96922
> > 
> > LGTM. Sorry for I put HandleInput() at the wrong place.
> 
> With this small change, your controller support works very smoothly, great
> work!

Although using this way the latency can be resolved, but it makes users only can see controllers' update at the present mode.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: