Make gamepad's use of GVR controller threadsafe |
|||||
Issue descriptionMore context is in issue 674594 . The GVR library is not thread safe, and we're required to use it on VR Shell's GL thread (see vr_shell_gl.cc), so the gamepad API must also use it on that thread.
,
Mar 21 2017
Proposed fix in https://codereview.chromium.org/2762003002/
,
Mar 21 2017
,
Mar 23 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/dee8e0a41990efbaec2435faff764baee5b894d9 commit dee8e0a41990efbaec2435faff764baee5b894d9 Author: klausw <klausw@chromium.org> Date: Thu Mar 23 07:45:11 2017 Refactor GVR controller gamepad API integration The GVR device code had its own gvr_api instance and controller state in the UI thread, this was causing conflicts with using the same APIs from the GL thread in vr_shell_gl. Symptoms included not getting window click events for touchpad clicks after a WebVR application used the gamepad API to read a GVR controller, this broke transient event handling such as button up/down detection. Instead, poll controllers only once from within VrShellGl, and post the data to VrShell which acts as a GvrGamepadDataProvider. That also handles registering/unregistering the gamepad device factory as needed. This only works while presenting, but that restriction already existed, the controller was not functional in magic window mode. BUG= 687992 Review-Url: https://codereview.chromium.org/2762003002 Cr-Commit-Position: refs/heads/master@{#459017} [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_controller.cc [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_controller.h [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_shell.cc [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_shell.h [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_shell_delegate.cc [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_shell_gl.cc [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/chrome/browser/android/vr_shell/vr_shell_gl.h [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/device/gamepad/gamepad_provider.cc [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/device/vr/BUILD.gn [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/device/vr/android/gvr/gvr_gamepad_data_fetcher.cc [modify] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/device/vr/android/gvr/gvr_gamepad_data_fetcher.h [add] https://crrev.com/dee8e0a41990efbaec2435faff764baee5b894d9/device/vr/android/gvr/gvr_gamepad_data_provider.h
,
Mar 24 2017
Fixed as of today's 59.0.3050.0 Canary release.
,
Apr 27 2017
,
Jul 4
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by klausw@chromium.org
, Mar 20 2017Labels: -Pri-2 M-59 Pri-1