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

Issue 2398343002: X11: Avoid round-tripping to get the cursor position (Closed)

Created:
4 years, 2 months ago by Tom (Use chromium acct)
Modified:
4 years, 2 months ago
Reviewers:
sadrul
CC:
chromium-reviews, tfarina, tdresser+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

X11: Avoid round-tripping to get the cursor position This is a performance optimization which avoids calling XQueryPointer when we're dispatching a mouse event. It's become a convenience to call GetCursorScreenPoint() all over the place in Chrome, even when an event which has the cursor position is available. R=sadrul@chromium.org Committed: https://crrev.com/6753a182d50ded7ddcbb91304bf71c6408c49f52 Cr-Commit-Position: refs/heads/master@{#424645}

Patch Set 1 #

Patch Set 2 : Revert install-sysroot thing #

Total comments: 10

Patch Set 3 : Add event stack #

Patch Set 4 : Actually add event stack #

Total comments: 6

Patch Set 5 : Use EventSystemLocationFromNative and base::nullopt #

Total comments: 2

Patch Set 6 : Add DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+56 lines, -17 lines) Patch
M ui/events/platform/x11/x11_event_source.h View 1 2 3 4 chunks +13 lines, -2 lines 0 comments Download
M ui/events/platform/x11/x11_event_source.cc View 1 2 3 4 5 3 chunks +34 lines, -5 lines 0 comments Download
M ui/views/widget/desktop_aura/desktop_screen_x11.cc View 1 2 3 2 chunks +9 lines, -10 lines 0 comments Download

Messages

Total messages: 43 (29 generated)
Tom (Use chromium acct)
https://codereview.chromium.org/2398343002/diff/20001/ui/views/widget/desktop_aura/desktop_screen_x11.cc File ui/views/widget/desktop_aura/desktop_screen_x11.cc (right): https://codereview.chromium.org/2398343002/diff/20001/ui/views/widget/desktop_aura/desktop_screen_x11.cc#newcode154 ui/views/widget/desktop_aura/desktop_screen_x11.cc:154: const XIEvent* xi_event = Do we need to check ...
4 years, 2 months ago (2016-10-07 00:23:19 UTC) #5
sadrul
https://codereview.chromium.org/2398343002/diff/20001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/2398343002/diff/20001/ui/events/platform/x11/x11_event_source.cc#newcode208 ui/events/platform/x11/x11_event_source.cc:208: delegate_->ProcessXEvent(xevent); This can trigger a nested message loop, which ...
4 years, 2 months ago (2016-10-07 02:12:51 UTC) #8
Tom (Use chromium acct)
This seems to eliminate most of the round trips caused by GetCursorScreenPoint, however round trips ...
4 years, 2 months ago (2016-10-07 21:13:18 UTC) #15
sadrul
I don't see any of the changes mentioned in the latest patchset.
4 years, 2 months ago (2016-10-09 03:32:43 UTC) #18
sadrul
Also, have you considered listening for mouse-events in the X11 root window instead?
4 years, 2 months ago (2016-10-09 03:34:55 UTC) #19
Tom (Use chromium acct)
On 2016/10/09 03:32:43, sadrul wrote: > I don't see any of the changes mentioned in ...
4 years, 2 months ago (2016-10-10 20:48:19 UTC) #20
sadrul
Some nits. https://codereview.chromium.org/2398343002/diff/140001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/2398343002/diff/140001/ui/events/platform/x11/x11_event_source.cc#newcode197 ui/events/platform/x11/x11_event_source.cc:197: XEvent* event = Early return if |dispatching_events_| ...
4 years, 2 months ago (2016-10-11 16:25:02 UTC) #25
Tom (Use chromium acct)
https://codereview.chromium.org/2398343002/diff/140001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/2398343002/diff/140001/ui/events/platform/x11/x11_event_source.cc#newcode197 ui/events/platform/x11/x11_event_source.cc:197: XEvent* event = On 2016/10/11 16:25:02, sadrul wrote: > ...
4 years, 2 months ago (2016-10-11 18:00:19 UTC) #26
sadrul
https://codereview.chromium.org/2398343002/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/2398343002/diff/160001/ui/events/platform/x11/x11_event_source.cc#newcode202 ui/events/platform/x11/x11_event_source.cc:202: if (event) { Should this be a DCHECK()? This ...
4 years, 2 months ago (2016-10-12 00:17:17 UTC) #31
Tom (Use chromium acct)
https://codereview.chromium.org/2398343002/diff/160001/ui/events/platform/x11/x11_event_source.cc File ui/events/platform/x11/x11_event_source.cc (right): https://codereview.chromium.org/2398343002/diff/160001/ui/events/platform/x11/x11_event_source.cc#newcode202 ui/events/platform/x11/x11_event_source.cc:202: if (event) { On 2016/10/12 00:17:17, sadrul wrote: > ...
4 years, 2 months ago (2016-10-12 01:03:27 UTC) #32
sadrul
lgtm
4 years, 2 months ago (2016-10-12 01:05:17 UTC) #35
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/2398343002/180001
4 years, 2 months ago (2016-10-12 01:52:11 UTC) #39
commit-bot: I haz the power
Committed patchset #6 (id:180001)
4 years, 2 months ago (2016-10-12 01:58:24 UTC) #41
commit-bot: I haz the power
4 years, 2 months ago (2016-10-12 02:00:18 UTC) #43
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/6753a182d50ded7ddcbb91304bf71c6408c49f52
Cr-Commit-Position: refs/heads/master@{#424645}

Powered by Google App Engine
This is Rietveld 408576698