Prevent WebXR controller from getting stuck when headset is removed.
When using a Daydream controller with a Mirage headset, the controller position and orientation would get stuck when taking the headset off and putting it back on. Doing so fires an input state change event which causes the XRInputSource to be re-created. The copy constructor for XRInputSource did a shallow copy of its grip and target ray spaces which meant they still point to the old XRInputSource object which no longer is exposed to the webpage or receives updates via mojo. Fix this by making the XRInputSource copy constructor create new target ray and grip space objects that point to the new XRInputSource object. Bug: 968544 Change-Id: I33542bde17bac70d57569bcdcce4a0206d8f45ce Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637239 Commit-Queue: Jacob DeWitt <jacde@chromium.org> Reviewed-by:Bill Orr <billorr@chromium.org> Reviewed-by:
Alexander Cooper <alcooper@chromium.org> Cr-Commit-Position: refs/heads/master@{#664963}
Showing
Please register or sign in to comment