Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Issue 2076013002: exo: Implement wayland gamepad support (Closed)

Created:
4 years, 6 months ago by denniskempin
Modified:
4 years, 5 months ago
Reviewers:
reveman, bajones
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@serv
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

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 Committed: https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69 Cr-Commit-Position: refs/heads/master@{#405356}

Patch Set 1 #

Patch Set 2 : using new device/gamepad api #

Patch Set 3 : minor adjustments to protocol #

Total comments: 15

Patch Set 4 : switched to single gamepad support #

Patch Set 5 : atexo: Implement wayland gamepad support #

Patch Set 6 : removed old gamepads.* files #

Patch Set 7 : nasty little missing comma... #

Patch Set 8 : do not depend on webkit but device/gamepad #

Total comments: 1

Patch Set 9 : fixed polling thread. #

Total comments: 53

Patch Set 10 : removed id from Gamepad and updated wording #

Total comments: 4

Patch Set 11 : fixed nits. only sends gamepad updates if an exo window is in focus. #

Total comments: 18

Patch Set 12 : Focus handling. Process gamepad delta on origin thread. Add focus unittest. #

Total comments: 37

Patch Set 13 : limit polling to when exo windows are focused #

Total comments: 20

Patch Set 14 : moved polling thread resources into separate class. pass task_runner into Gamepad. #

Total comments: 46

Patch Set 15 : fixed nits and smaller issues #

Total comments: 21

Patch Set 16 : fixed nits #

Patch Set 17 : changed back callback to store by copy instead of reference. #

Patch Set 18 : rebase #

Patch Set 19 : rebase #

Patch Set 20 : added dep to //base/test:test_support #

Patch Set 21 : added dep.. this time to the right target hopefully #

Patch Set 22 : ... looks like both targets want this dep. #

Patch Set 23 : more missing deps. I wonder why these do not come up during pre-submit #

Unified diffs Side-by-side diffs Delta from patch set Stats (+721 lines, -2 lines) Patch
M components/exo.gypi View 1 2 3 3 chunks +4 lines, -0 lines 0 comments Download
M components/exo/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 5 chunks +7 lines, -0 lines 0 comments Download
M components/exo/DEPS View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
A components/exo/gamepad.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +71 lines, -0 lines 0 comments Download
A components/exo/gamepad.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +265 lines, -0 lines 0 comments Download
A components/exo/gamepad_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +46 lines, -0 lines 0 comments Download
A components/exo/gamepad_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +221 lines, -0 lines 0 comments Download
M components/exo/wayland/BUILD.gn View 1 2 3 20 1 chunk +2 lines, -0 lines 0 comments Download
M components/exo/wayland/server.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 5 chunks +100 lines, -0 lines 0 comments Download
M device/gamepad/gamepad_data_fetcher.h View 1 2 chunks +2 lines, -1 line 0 comments Download
M device/gamepad/gamepad_platform_data_fetcher_linux.h View 1 1 chunk +2 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 69 (28 generated)
denniskempin
4 years, 6 months ago (2016-06-23 21:30:17 UTC) #5
denniskempin
Sent this out a little prematurely. Still need to polish and document this. But if ...
4 years, 6 months ago (2016-06-23 21:31:39 UTC) #6
denniskempin
On 2016/06/23 21:31:39, denniskempin wrote: > Sent this out a little prematurely. Still need to ...
4 years, 6 months ago (2016-06-25 01:04:51 UTC) #7
reveman
lg. some comments but please take a look at my comments on the wayland interface ...
4 years, 5 months ago (2016-06-27 17:30:35 UTC) #8
denniskempin
reveman, I fixed or commented on your notes. This CL is also updates to use ...
4 years, 5 months ago (2016-06-29 17:12:27 UTC) #9
denniskempin
There was a comma missing in the DEPS file, that solves the presubmit issue. Also ...
4 years, 5 months ago (2016-06-29 17:25:35 UTC) #10
denniskempin
https://codereview.chromium.org/2076013002/diff/140001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/140001/components/exo/gamepad.cc#newcode41 components/exo/gamepad.cc:41: origin_task_runner_(base::ThreadTaskRunnerHandle::Get()) { reveman: An update on this. Eventually we ...
4 years, 5 months ago (2016-06-29 18:20:54 UTC) #11
reveman
mostly nits https://codereview.chromium.org/2076013002/diff/160001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/160001/components/exo/gamepad.cc#newcode20 components/exo/gamepad.cc:20: namespace { nit: blank line after this. ...
4 years, 5 months ago (2016-06-29 21:55:46 UTC) #12
denniskempin
Gamepad will now check the focus before sending updates to the client https://codereview.chromium.org/2076013002/diff/160001/components/exo/gamepad.cc File components/exo/gamepad.cc ...
4 years, 5 months ago (2016-06-30 00:29:22 UTC) #13
reveman
https://codereview.chromium.org/2076013002/diff/200001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/200001/components/exo/gamepad.cc#newcode32 components/exo/gamepad.cc:32: constexpr unsigned kPollingTimeDelta = 16; nit: s/TimeDelta/Interval/? Chromium usually ...
4 years, 5 months ago (2016-06-30 01:19:06 UTC) #14
denniskempin
https://codereview.chromium.org/2076013002/diff/200001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/200001/components/exo/gamepad.cc#newcode32 components/exo/gamepad.cc:32: constexpr unsigned kPollingTimeDelta = 16; On 2016/06/30 01:19:05, reveman ...
4 years, 5 months ago (2016-06-30 03:23:43 UTC) #15
denniskempin
https://codereview.chromium.org/2076013002/diff/200001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/200001/components/exo/gamepad.cc#newcode70 components/exo/gamepad.cc:70: base::AutoLock _l(lock_); On 2016/06/30 03:23:43, denniskempin wrote: > On ...
4 years, 5 months ago (2016-06-30 04:56:46 UTC) #16
denniskempin
We actually do still need a weak pointer factory to post tasks from the polling ...
4 years, 5 months ago (2016-06-30 17:08:29 UTC) #17
reveman
https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad.cc#newcode32 components/exo/gamepad.cc:32: constexpr unsigned kPollingTimeIntervalMs = 16; I'm still not sure ...
4 years, 5 months ago (2016-06-30 18:06:12 UTC) #18
denniskempin
https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad.cc#newcode32 components/exo/gamepad.cc:32: constexpr unsigned kPollingTimeIntervalMs = 16; On 2016/06/30 18:06:11, reveman ...
4 years, 5 months ago (2016-07-01 02:34:36 UTC) #19
denniskempin
https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad_unittest.cc File components/exo/gamepad_unittest.cc (right): https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad_unittest.cc#newcode86 components/exo/gamepad_unittest.cc:86: // to be processed. On 2016/07/01 02:34:36, denniskempin wrote: ...
4 years, 5 months ago (2016-07-01 17:16:50 UTC) #20
reveman
https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/220001/components/exo/gamepad.cc#newcode32 components/exo/gamepad.cc:32: constexpr unsigned kPollingTimeIntervalMs = 16; On 2016/07/01 at 02:34:35, ...
4 years, 5 months ago (2016-07-07 22:14:03 UTC) #21
denniskempin
https://codereview.chromium.org/2076013002/diff/240001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/240001/components/exo/gamepad.cc#newcode130 components/exo/gamepad.cc:130: if (external_fetcher_) { On 2016/07/07 22:14:02, reveman wrote: > ...
4 years, 5 months ago (2016-07-08 23:49:40 UTC) #22
reveman
mostly nits https://codereview.chromium.org/2076013002/diff/260001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/260001/components/exo/gamepad.cc#newcode42 components/exo/gamepad.cc:42: class Gamepad::PollingThreadResources nit: this class contains more ...
4 years, 5 months ago (2016-07-11 10:50:45 UTC) #23
denniskempin
all done https://codereview.chromium.org/2076013002/diff/260001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/260001/components/exo/gamepad.cc#newcode42 components/exo/gamepad.cc:42: class Gamepad::PollingThreadResources On 2016/07/11 10:50:44, reveman wrote: ...
4 years, 5 months ago (2016-07-11 17:43:29 UTC) #24
reveman
lgtm with some more nits https://codereview.chromium.org/2076013002/diff/280001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/280001/components/exo/gamepad.cc#newcode116 components/exo/gamepad.cc:116: has_poll_scheduled_ = false; nit: ...
4 years, 5 months ago (2016-07-11 18:45:01 UTC) #25
bajones
device/gamepad/ LGTM
4 years, 5 months ago (2016-07-12 19:42:27 UTC) #26
denniskempin
all done. I think we are good to go here! https://codereview.chromium.org/2076013002/diff/280001/components/exo/gamepad.cc File components/exo/gamepad.cc (right): https://codereview.chromium.org/2076013002/diff/280001/components/exo/gamepad.cc#newcode116 ...
4 years, 5 months ago (2016-07-12 19:54:13 UTC) #27
denniskempin
Ran a couple of last tests.. played some GTA. Let's submit this! ;) https://codereview.chromium.org/2076013002/diff/280001/components/exo/gamepad.cc File ...
4 years, 5 months ago (2016-07-12 20:03:37 UTC) #28
commit-bot: I haz the power
This CL has an open dependency (Issue 2093803002 Patch 120001). Please resolve the dependency and ...
4 years, 5 months ago (2016-07-12 20:06:34 UTC) #32
commit-bot: I haz the power
This CL has an open dependency (Issue 2093803002 Patch 160001). Please resolve the dependency and ...
4 years, 5 months ago (2016-07-13 15:50:48 UTC) #36
commit-bot: I haz the power
This CL has an open dependency (Issue 2093803002 Patch 160001). Please resolve the dependency and ...
4 years, 5 months ago (2016-07-13 15:53:03 UTC) #39
denniskempin
On 2016/07/13 15:53:03, commit-bot: I haz the power wrote: > This CL has an open ...
4 years, 5 months ago (2016-07-13 15:53:48 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2076013002/360001
4 years, 5 months ago (2016-07-13 20:04:24 UTC) #42
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_compile_dbg_ng/builds/230480) linux_chromium_chromeos_ozone_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-07-13 20:12:23 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2076013002/380001
4 years, 5 months ago (2016-07-13 21:03:24 UTC) #48
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/167254) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-07-13 21:11:52 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2076013002/400001
4 years, 5 months ago (2016-07-13 21:39:19 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/167286) chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-07-13 21:46:33 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2076013002/420001
4 years, 5 months ago (2016-07-13 22:05:48 UTC) #58
commit-bot: I haz the power
Try jobs failed on following builders: chromeos_amd64-generic_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_amd64-generic_chromium_compile_only_ng/builds/167314) linux_chromium_chromeos_compile_dbg_ng on master.tryserver.chromium.linux (JOB_FAILED, ...
4 years, 5 months ago (2016-07-13 22:12:51 UTC) #60
denniskempin
I found out about gn check.. this should have all the deps now.
4 years, 5 months ago (2016-07-13 22:18:20 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2076013002/440001
4 years, 5 months ago (2016-07-13 22:19:18 UTC) #64
commit-bot: I haz the power
Committed patchset #23 (id:440001)
4 years, 5 months ago (2016-07-14 00:06:12 UTC) #66
commit-bot: I haz the power
CQ bit was unchecked.
4 years, 5 months ago (2016-07-14 00:06:24 UTC) #67
commit-bot: I haz the power
4 years, 5 months ago (2016-07-14 00:09:43 UTC) #69
Message was sent while issue was closed.
Patchset 23 (id:??) landed as
https://crrev.com/68de182439eed91857dafbb4348f1e4857b18c69
Cr-Commit-Position: refs/heads/master@{#405356}

Powered by Google App Engine
This is Rietveld 408576698