Chromium Code Reviews
DescriptionRefactor 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}
Committed: https://chromium.googlesource.com/chromium/src/+/dee8e0a41990efbaec2435faff764baee5b894d9
Patch Set 1 #Patch Set 2 : Remove obsolete gvr includes #Patch Set 3 : Add missing .h file #Patch Set 4 : Add comments to help demystify this new abstraction #
Total comments: 4
Patch Set 5 : Comment fixes #Patch Set 6 : Fix comment, include gvr_types only for data provider #
Total comments: 2
Patch Set 7 : Rename GamepadData{Update,Get} to {Update,Get}GamepadData #Patch Set 8 : Rebase, fix merge conflict #Patch Set 9 : Fix __aeabi_f2lz link error. Argh. #Patch Set 10 : Move gamepad data provider to vr_shell-delegate. #Patch Set 11 : Revert vr_shell_delegate changes, new fetcher/provider API #
Total comments: 2
Patch Set 12 : Add more lifecycle comments #Patch Set 13 : Add missing "override" #Patch Set 14 : Rebase, no changes #Messages
Total messages: 56 (31 generated)
|