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

Issue 2884463002: Make event-targeting asynchronous in window server. (Closed)

Created:
3 years, 7 months ago by riajiang
Modified:
3 years, 6 months ago
Reviewers:
sadrul, sky
CC:
chromium-reviews, rjkroege, gklassen
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Make event-targeting asynchronous in window server. Change hit-testing in EventTargeter to be asynchronous to accommodate hit-testing cases that cannot be solved by HittestComponent if the flag "enable-async-event-targeting" is turned on. Next steps: 1. Explore hit-test optimization/caching. 2. Once HittestComponent (gklassen@) is implemented, update event targeting to talk to HittestComponent synchronously for most cases and talk to blink for "hard" cases that cannot be solved by HittestComponent. BUG=710016 TEST=service_unittest Review-Url: https://codereview.chromium.org/2884463002 Cr-Commit-Position: refs/heads/master@{#477783} Committed: https://chromium.googlesource.com/chromium/src/+/4cd9767ab7c89145bbec6b343ae701c83bf42e9d

Patch Set 1 #

Total comments: 4

Patch Set 2 : WeakPtrFactory; const &; etc #

Total comments: 11

Patch Set 3 : sky@ comments #

Patch Set 4 : hit-test-in-flight #

Patch Set 5 : std::move #

Total comments: 8

Patch Set 6 : rebase and use EventTargeter #

Total comments: 6

Patch Set 7 : cache; by value #

Total comments: 20

Patch Set 8 : comments #

Total comments: 14

Patch Set 9 : rebase and comments #

Total comments: 8

Patch Set 10 : comments #

Patch Set 11 : rebase after https://codereview.chromium.org/2925913002/ #

Patch Set 12 : rebase #

Total comments: 14

Patch Set 13 : comments #40 #

Total comments: 8

Patch Set 14 : comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+634 lines, -339 lines) Patch
M services/ui/ws/event_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +19 lines, -3 lines 0 comments Download
M services/ui/ws/event_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 8 chunks +63 lines, -33 lines 0 comments Download
M services/ui/ws/event_dispatcher_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 3 chunks +8 lines, -5 lines 0 comments Download
M services/ui/ws/event_dispatcher_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 101 chunks +248 lines, -184 lines 0 comments Download
M services/ui/ws/event_targeter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +42 lines, -4 lines 0 comments Download
M services/ui/ws/event_targeter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +73 lines, -4 lines 0 comments Download
M services/ui/ws/event_targeter_delegate.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +4 lines, -0 lines 0 comments Download
M services/ui/ws/test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +8 lines, -5 lines 0 comments Download
M services/ui/ws/window_manager_state.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 6 chunks +26 lines, -27 lines 0 comments Download
M services/ui/ws/window_manager_state.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 23 chunks +85 lines, -66 lines 0 comments Download
M services/ui/ws/window_manager_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 6 chunks +58 lines, -4 lines 0 comments Download
M services/ui/ws/window_server.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +0 lines, -4 lines 0 comments Download

Messages

Total messages: 50 (16 generated)
riajiang
Hi, PTAL, thanks!
3 years, 7 months ago (2017-05-12 21:00:23 UTC) #5
sky
I started looking at this and have some questions about how the HittestComponent will work. ...
3 years, 7 months ago (2017-05-14 15:59:06 UTC) #8
sadrul
On 2017/05/14 15:59:06, sky wrote: > I started looking at this and have some questions ...
3 years, 7 months ago (2017-05-15 14:48:28 UTC) #9
riajiang
https://codereview.chromium.org/2884463002/diff/1/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/1/services/ui/ws/event_dispatcher.cc#newcode636 services/ui/ws/event_dispatcher.cc:636: base::Unretained(this), location, std::move(callback))); On 2017/05/14 15:59:05, sky wrote: > ...
3 years, 7 months ago (2017-05-15 18:34:41 UTC) #10
sky
https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/event_dispatcher.h File services/ui/ws/event_dispatcher.h (right): https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/event_dispatcher.h#newcode128 services/ui/ws/event_dispatcher.h:128: void UpdateNonClientAreaForCurrentWindow(const base::Closure& callback); Having any of these functions ...
3 years, 7 months ago (2017-05-15 21:20:24 UTC) #11
riajiang
https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/event_dispatcher.h File services/ui/ws/event_dispatcher.h (right): https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/event_dispatcher.h#newcode128 services/ui/ws/event_dispatcher.h:128: void UpdateNonClientAreaForCurrentWindow(const base::Closure& callback); On 2017/05/15 21:20:23, sky wrote: ...
3 years, 7 months ago (2017-05-17 02:01:59 UTC) #12
sky
https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/window_manager_state.cc File services/ui/ws/window_manager_state.cc (right): https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/window_manager_state.cc#newcode293 services/ui/ws/window_manager_state.cc:293: if (in_flight_event_details_ || event_dispatcher_.HittestInFlight()) { On 2017/05/17 02:01:59, riajiang ...
3 years, 7 months ago (2017-05-17 18:14:43 UTC) #13
riajiang
https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/window_manager_state.cc File services/ui/ws/window_manager_state.cc (right): https://codereview.chromium.org/2884463002/diff/20001/services/ui/ws/window_manager_state.cc#newcode293 services/ui/ws/window_manager_state.cc:293: if (in_flight_event_details_ || event_dispatcher_.HittestInFlight()) { On 2017/05/17 18:14:43, sky ...
3 years, 7 months ago (2017-05-19 16:49:30 UTC) #14
sky
https://codereview.chromium.org/2884463002/diff/80001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/80001/services/ui/ws/event_dispatcher.cc#newcode49 services/ui/ws/event_dispatcher.cc:49: hittest_callback = std::move(callback); move to member initializer. https://codereview.chromium.org/2884463002/diff/80001/services/ui/ws/event_dispatcher.h File ...
3 years, 7 months ago (2017-05-22 16:06:56 UTC) #15
riajiang
https://codereview.chromium.org/2884463002/diff/80001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/80001/services/ui/ws/event_dispatcher.cc#newcode49 services/ui/ws/event_dispatcher.cc:49: hittest_callback = std::move(callback); On 2017/05/22 16:06:56, sky wrote: > ...
3 years, 6 months ago (2017-05-29 23:38:08 UTC) #19
sky
https://codereview.chromium.org/2884463002/diff/120001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/120001/services/ui/ws/event_dispatcher.cc#newcode235 services/ui/ws/event_dispatcher.cc:235: void EventDispatcher::UpdateCursorProviderByLastKnownLocation() { This class is mostly written assuming ...
3 years, 6 months ago (2017-05-30 17:26:02 UTC) #20
sky
On 2017/05/30 17:26:02, sky wrote: > https://codereview.chromium.org/2884463002/diff/120001/services/ui/ws/event_dispatcher.cc > File services/ui/ws/event_dispatcher.cc (right): > > https://codereview.chromium.org/2884463002/diff/120001/services/ui/ws/event_dispatcher.cc#newcode235 > ...
3 years, 6 months ago (2017-05-30 17:40:40 UTC) #21
riajiang
On 2017/05/30 17:40:40, sky wrote: > On 2017/05/30 17:26:02, sky wrote: > > > https://codereview.chromium.org/2884463002/diff/120001/services/ui/ws/event_dispatcher.cc ...
3 years, 6 months ago (2017-05-31 19:38:59 UTC) #22
sky
*SIGH* What I want to make sure is that we avoid repeated async lookup during ...
3 years, 6 months ago (2017-05-31 21:26:43 UTC) #23
riajiang
On 2017/05/31 21:26:43, sky wrote: > *SIGH* > What I want to make sure is ...
3 years, 6 months ago (2017-05-31 22:44:03 UTC) #25
sky
Ok, you convinced me to continue with what you have. I have a question below ...
3 years, 6 months ago (2017-05-31 23:36:35 UTC) #26
riajiang
https://codereview.chromium.org/2884463002/diff/160001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/160001/services/ui/ws/event_dispatcher.cc#newcode227 services/ui/ws/event_dispatcher.cc:227: event_targeter_->FindDeepestVisibleWindowForEvents( On 2017/05/31 23:36:34, sky wrote: > Can all ...
3 years, 6 months ago (2017-06-01 18:22:12 UTC) #28
sky
https://codereview.chromium.org/2884463002/diff/160001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/160001/services/ui/ws/event_dispatcher.cc#newcode227 services/ui/ws/event_dispatcher.cc:227: event_targeter_->FindDeepestVisibleWindowForEvents( On 2017/06/01 18:22:11, riajiang wrote: > On 2017/05/31 ...
3 years, 6 months ago (2017-06-01 21:12:58 UTC) #29
riajiang
https://codereview.chromium.org/2884463002/diff/160001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/160001/services/ui/ws/event_dispatcher.cc#newcode227 services/ui/ws/event_dispatcher.cc:227: event_targeter_->FindDeepestVisibleWindowForEvents( On 2017/06/01 21:12:58, sky wrote: > On 2017/06/01 ...
3 years, 6 months ago (2017-06-01 22:00:21 UTC) #30
sky
On Thu, Jun 1, 2017 at 3:00 PM, <riajiang@chromium.org> wrote: > > https://codereview.chromium.org/2884463002/diff/160001/ > services/ui/ws/event_dispatcher.cc ...
3 years, 6 months ago (2017-06-02 13:20:49 UTC) #31
riajiang
> For the most part mus-ws is single threaded, so we can't be processing both ...
3 years, 6 months ago (2017-06-02 17:56:29 UTC) #32
sky
On Fri, Jun 2, 2017 at 10:56 AM, <riajiang@chromium.org> wrote: > > For the most ...
3 years, 6 months ago (2017-06-02 21:01:11 UTC) #33
sky
https://codereview.chromium.org/2884463002/diff/200001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/200001/services/ui/ws/event_dispatcher.cc#newcode461 services/ui/ws/event_dispatcher.cc:461: event_targeter_->ProcessNextHittesetRequestFromQueue(); Why does this code need to call back ...
3 years, 6 months ago (2017-06-02 21:17:51 UTC) #34
riajiang
https://codereview.chromium.org/2884463002/diff/200001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/200001/services/ui/ws/event_dispatcher.cc#newcode461 services/ui/ws/event_dispatcher.cc:461: event_targeter_->ProcessNextHittesetRequestFromQueue(); On 2017/06/02 21:17:51, sky wrote: > Because this ...
3 years, 6 months ago (2017-06-02 22:56:17 UTC) #36
sky
I apologize for the multiple rounds of comments here, but this is tricky! I think ...
3 years, 6 months ago (2017-06-02 23:28:20 UTC) #37
riajiang
https://codereview.chromium.org/2884463002/diff/240001/services/ui/ws/event_dispatcher.h File services/ui/ws/event_dispatcher.h (right): https://codereview.chromium.org/2884463002/diff/240001/services/ui/ws/event_dispatcher.h#newcode65 services/ui/ws/event_dispatcher.h:65: const EventTargeter* event_targeter() const { return event_targeter_.get(); } On ...
3 years, 6 months ago (2017-06-05 23:56:15 UTC) #38
riajiang
Rebased. Could you take another look? Thanks!
3 years, 6 months ago (2017-06-07 16:36:39 UTC) #39
sky
https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_dispatcher.cc#newcode309 services/ui/ws/event_dispatcher.cc:309: (event.AsPointerEvent())->root_location(), event_display_id_, Looks like you have unnecessary () around ...
3 years, 6 months ago (2017-06-07 17:05:07 UTC) #40
riajiang
https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_dispatcher.cc#newcode309 services/ui/ws/event_dispatcher.cc:309: (event.AsPointerEvent())->root_location(), event_display_id_, On 2017/06/07 17:05:07, sky wrote: > Looks ...
3 years, 6 months ago (2017-06-07 18:15:04 UTC) #41
sky
LGTM with a better description as mentioned below. https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_targeter.h File services/ui/ws/event_targeter.h (right): https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_targeter.h#newcode73 services/ui/ws/event_targeter.h:73: // ...
3 years, 6 months ago (2017-06-07 19:46:41 UTC) #42
sadrul
nice! lgtm with some nits. https://codereview.chromium.org/2884463002/diff/320001/services/ui/ws/event_dispatcher.cc File services/ui/ws/event_dispatcher.cc (right): https://codereview.chromium.org/2884463002/diff/320001/services/ui/ws/event_dispatcher.cc#newcode228 services/ui/ws/event_dispatcher.cc:228: base::Unretained(this))); I guess using ...
3 years, 6 months ago (2017-06-07 20:16:05 UTC) #43
riajiang
https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_targeter.h File services/ui/ws/event_targeter.h (right): https://codereview.chromium.org/2884463002/diff/300001/services/ui/ws/event_targeter.h#newcode73 services/ui/ws/event_targeter.h:73: // Request would go into this queue if it's ...
3 years, 6 months ago (2017-06-07 21:46:26 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/2884463002/340001
3 years, 6 months ago (2017-06-07 21:47:51 UTC) #47
commit-bot: I haz the power
3 years, 6 months ago (2017-06-07 23:27:48 UTC) #50
Message was sent while issue was closed.
Committed patchset #14 (id:340001) as
https://chromium.googlesource.com/chromium/src/+/4cd9767ab7c89145bbec6b343ae7...

Powered by Google App Engine
This is Rietveld 408576698