New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 620977 link

Starred by 2 users

Issue metadata

Status: Archived
Owner:
Last visit > 30 days ago
Closed: Jul 2016
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Implement Gamepad Support in Exosphere

Project Member Reported by denniskempin@chromium.org, Jun 17 2016

Issue description

This includes passing gamepad data from content/browser/gamepad to exosphere and a wayland protocol in exo. 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 13 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/350078de44e0def33380d1074446408f6ebe6967

commit 350078de44e0def33380d1074446408f6ebe6967
Author: denniskempin <denniskempin@google.com>
Date: Wed Jul 13 19:52:07 2016

wayland-protocols: Add gaming-input-unstable-v1 protocol

This protocol allows the wayland server to notify the client of
connected gamepads and their state.
The protocol does not support axis mapping but assumes the use of the
'Standard Gamepad' as defined by the W3C gamepad API.

BUG= 620977 

Review-Url: https://codereview.chromium.org/2093803002
Cr-Commit-Position: refs/heads/master@{#405238}

[modify] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/BUILD.gn
[modify] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/README.chromium
[add] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h
[add] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h
[add] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/protocol/gaming-input-protocol.c
[add] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/unstable/gaming-input/README
[add] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v1.xml
[modify] https://crrev.com/350078de44e0def33380d1074446408f6ebe6967/third_party/wayland-protocols/wayland-protocols.gyp

Project Member

Comment 2 by bugdroid1@chromium.org, Jul 14 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/68de182439eed91857dafbb4348f1e4857b18c69

commit 68de182439eed91857dafbb4348f1e4857b18c69
Author: denniskempin <denniskempin@google.com>
Date: Thu Jul 14 00:04:59 2016

This CL implements the gamepads wayland API. Since js device nodes
on linux can be opened multiple times, we are not required to go
through the content::GamepadService, but can directly use our own
device::GamepadPlatformDataFetcher in our own polling thread.
The polling thread will compare the newly fetched data to the previous
data and send any changes as events to the wayland client.

BUG= 620977 

Review-Url: https://codereview.chromium.org/2076013002
Cr-Commit-Position: refs/heads/master@{#405356}

[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo.gypi
[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/BUILD.gn
[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/DEPS
[add] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/gamepad.cc
[add] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/gamepad.h
[add] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/gamepad_delegate.h
[add] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/gamepad_unittest.cc
[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/wayland/BUILD.gn
[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/components/exo/wayland/server.cc
[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/device/gamepad/gamepad_data_fetcher.h
[modify] https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69/device/gamepad/gamepad_platform_data_fetcher_linux.h

Status: Fixed (was: Started)
Wayland server side is done. 
Cc: katierh@chromium.org elijahtaylor@chromium.org
Labels: Merge-Request-53 M-53
Requesting Merge into M53. This is an important feature for ARC that should go into the current dev channel release. 

The impact on other platforms is small, since components/exo is only enabled on cheets builds. 

Note: These two changes depend on this refactoring by bajones@: https://codereview.chromium.org/2076013002

All these changes have been in Chrome builds since at least 54.0.2796.0

The overall feature with the android-side changes has been in the canary builds since 8594. I will request a merge for the android-side as well. The android-side depends on the chrome-side however not the other way around, so it's safe to merge the chrome-side before the android-side. 

Comment 5 by dimu@google.com, Jul 18 2016

Labels: -Merge-Request-53 Merge-Review-53 Hotlist-Merge-Review
[Automated comment] DEPS changes referenced in bugdroid comments, needs manual review.

Comment 6 by gov...@chromium.org, Jul 18 2016

Before we approve merge to M53, Could you please confirm whether this change is baked/verified in Canary and safe to merge?

Also is this change applicable to all OS or any specific OS?
Let's get the known issue with destruction order fixed before we merge this.
I just submitted the fix for that, should get in soon. We gotta wait for a Chrome uprev and canary build to make sure the changes are safe to merge. 

Comment 9 by gov...@chromium.org, Jul 19 2016

Pls update the bug once the changes are baked/verified in canary and safe. Also is this change applicable to all OS or any specific OS?
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 19 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3633143505b30713e83baabfa7767877bf79788

commit a3633143505b30713e83baabfa7767877bf79788
Author: denniskempin <denniskempin@google.com>
Date: Tue Jul 19 18:35:52 2016

exo: Fix crash in out-of-order destruction of Gamepad

Destroying the gaming input resource will destroy the gamepad
polling thread, which causes the Gamepad destructor to access an
invalid reference to the task runner of that thread.
This CL changes the raw pointer to a ref counted pointer so we won't
destroy the task runner prematurely.

BUG= 620977 

Review-Url: https://codereview.chromium.org/2159283002
Cr-Commit-Position: refs/heads/master@{#406327}

[modify] https://crrev.com/a3633143505b30713e83baabfa7767877bf79788/components/exo/gamepad.cc

Will do! This is just applicable for ChromeOS systems that have Android Apps enabled. 
Cc: keta...@chromium.org
Labels: OS-Chrome
+ ketakid@ (Chrome OS TPM) for M53 approval.
Still waiting on a good Chrome PFQ run. 
Allright, we got an uprev and a good canary build. I can verify that the patches here are working well on samus-cheets canary and minnie-cheets canary. 

This code will only impact ChromeOS systems with Android Apps enabled. 

However we require this CL https://codereview.chromium.org/2076013002
which is a refactoring that impacts all platforms, but has been working well in canary for a while now. 
Labels: Merge-Request-53
Not sure if I have to add the merge request label again, please remove it if that's not right. 

Comment 16 by dimu@chromium.org, Jul 25 2016

Labels: -Merge-Request-53
[Automated comment] DEPS changes referenced in bugdroid comments, needs manual review.
Labels: -Merge-Review-53 Merge-Approved-53
Approving merge to M53 cros since this change has been in canary for a while.


Project Member

Comment 18 by bugdroid1@chromium.org, Jul 25 2016

Labels: -merge-approved-53 merge-merged-2785
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/991de78e4f4a411fb2e446b5198506f2f287ed6d

commit 991de78e4f4a411fb2e446b5198506f2f287ed6d
Author: denniskempin <denniskempin@google.com>
Date: Mon Jul 25 21:08:51 2016

This CL implements the gamepads wayland API. Since js device nodes on linux can be opened multiple times, we are not required to go through the content::GamepadService, but can directly use our own device::GamepadPlatformDataFetcher in our own polling thread. The polling thread will compare the newly fetched data to the previous data and send any changes as events to the wayland client.

BUG= 620977 
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2076013002
Cr-Commit-Position: refs/heads/master@{#405356}
(cherry picked from commit 68de182439eed91857dafbb4348f1e4857b18c69)

Review-Url: https://codereview.chromium.org/2179903003
Cr-Commit-Position: refs/branch-heads/2785@{#340}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo.gypi
[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/BUILD.gn
[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/DEPS
[add] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/gamepad.cc
[add] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/gamepad.h
[add] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/gamepad_delegate.h
[add] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/gamepad_unittest.cc
[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/wayland/BUILD.gn
[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/components/exo/wayland/server.cc
[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/device/gamepad/gamepad_data_fetcher.h
[modify] https://crrev.com/991de78e4f4a411fb2e446b5198506f2f287ed6d/device/gamepad/gamepad_platform_data_fetcher_linux.h

Project Member

Comment 19 by bugdroid1@chromium.org, Jul 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2

commit 88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2
Author: denniskempin <denniskempin@google.com>
Date: Mon Jul 25 21:20:28 2016

wayland-protocols: Add gaming-input-unstable-v1 protocol

This protocol allows the wayland server to notify the client of
connected gamepads and their state.
The protocol does not support axis mapping but assumes the use of the
'Standard Gamepad' as defined by the W3C gamepad API.

BUG= 620977 
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2093803002
Cr-Commit-Position: refs/heads/master@{#405238}
(cherry picked from commit 350078de44e0def33380d1074446408f6ebe6967)

Review-Url: https://codereview.chromium.org/2182703002
Cr-Commit-Position: refs/branch-heads/2785@{#343}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/BUILD.gn
[modify] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/README.chromium
[add] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-client-protocol.h
[add] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/include/protocol/gaming-input-unstable-v1-server-protocol.h
[add] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/protocol/gaming-input-protocol.c
[add] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/unstable/gaming-input/README
[add] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/unstable/gaming-input/gaming-input-unstable-v1.xml
[modify] https://crrev.com/88560cb68a2c7f0d8b1363a87aae39a0d4fdd6e2/third_party/wayland-protocols/wayland-protocols.gyp

Project Member

Comment 20 by bugdroid1@chromium.org, Jul 25 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e9e7b188f3aa71868f8648a150da06411723ea62

commit e9e7b188f3aa71868f8648a150da06411723ea62
Author: denniskempin <denniskempin@google.com>
Date: Mon Jul 25 21:34:10 2016

exo: Fix crash in out-of-order destruction of Gamepad

Destroying the gaming input resource will destroy the gamepad
polling thread, which causes the Gamepad destructor to access an
invalid reference to the task runner of that thread.
This CL changes the raw pointer to a ref counted pointer so we won't
destroy the task runner prematurely.

BUG= 620977 
NOTRY=true
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2159283002
Cr-Commit-Position: refs/heads/master@{#406327}
(cherry picked from commit a3633143505b30713e83baabfa7767877bf79788)

Review-Url: https://codereview.chromium.org/2179173002
Cr-Commit-Position: refs/branch-heads/2785@{#344}
Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

[modify] https://crrev.com/e9e7b188f3aa71868f8648a150da06411723ea62/components/exo/gamepad.cc

Comment 21 by dchan@google.com, Jan 21 2017

Labels: VerifyIn-57

Comment 22 by dchan@google.com, Mar 4 2017

Labels: VerifyIn-58

Comment 23 by dchan@google.com, Apr 17 2017

Labels: VerifyIn-59

Comment 24 by dchan@google.com, May 30 2017

Labels: VerifyIn-60
Labels: VerifyIn-61

Comment 26 by dchan@chromium.org, Oct 14 2017

Status: Archived (was: Fixed)

Sign in to add a comment