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

Issue 2648583003: Handle floating point coordinates from ozone to exosphere (Closed)

Created:
3 years, 11 months ago by denniskempin
Modified:
3 years, 11 months ago
Reviewers:
reveman, oshima, sky, sadrul, tdresser
CC:
cc-bugs_chromium.org, chromium-reviews, danakj+watch_chromium.org, jbauman+watch_chromium.org, kalyank, piman+watch_chromium.org, sadrul, tdresser+watch_chromium.org, tfarina, Ian Vollick
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Handle floating point coordinates from ozone to exosphere Most touch coordinate handling within chrome is done with gfx:Points. Rounding to points works well for most cases, but really degrades user experience for hand writing with an on-screen stylus. This change will add variants to a couple of coordinate transformation methods that will use gfx::PointF instead of gfx::Point. This allows touch coordinates to be passed from ozone to exosphere in sub-pixel accuracy, allowing those coordinates to be used in arc++ note taking apps. BUG=681235 TEST=Test with arc++ drawing apps without smoothing. Lines should be smooth without distinct steps. Review-Url: https://codereview.chromium.org/2648583003 Cr-Commit-Position: refs/heads/master@{#445510} Committed: https://chromium.googlesource.com/chromium/src/+/951e1c2407a8055588e51f2f7768f034c32b3e06

Patch Set 1 #

Patch Set 2 : Handle floating point coordinates from ozone to exosphere #

Total comments: 2

Patch Set 3 : added mac/stub/win/X version of EventLocationFromNativeF #

Patch Set 4 : added F variant to screen position client. fixed exo tests. #

Total comments: 5

Patch Set 5 : manually transform root_location_f #

Patch Set 6 : extended X/mac tests #

Total comments: 4

Patch Set 7 : fixed wayland unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+101 lines, -48 lines) Patch
M components/exo/touch.cc View 1 2 3 4 3 chunks +13 lines, -8 lines 0 comments Download
M components/exo/touch_delegate.h View 3 chunks +3 lines, -3 lines 0 comments Download
M components/exo/touch_unittest.cc View 1 2 3 14 chunks +22 lines, -22 lines 0 comments Download
M components/exo/wayland/server.cc View 2 chunks +6 lines, -6 lines 0 comments Download
M ui/events/cocoa/events_mac.mm View 1 2 1 chunk +6 lines, -2 lines 0 comments Download
M ui/events/cocoa/events_mac_unittest.mm View 1 2 3 4 5 5 chunks +14 lines, -0 lines 0 comments Download
M ui/events/event.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ui/events/event_utils.h View 1 chunk +2 lines, -0 lines 0 comments Download
M ui/events/events_default.cc View 1 chunk +8 lines, -0 lines 0 comments Download
M ui/events/events_stub.cc View 1 2 1 chunk +5 lines, -0 lines 0 comments Download
M ui/events/win/events_win.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/x/events_x.cc View 1 2 1 chunk +4 lines, -0 lines 0 comments Download
M ui/events/x/events_x_unittest.cc View 1 2 3 4 5 5 chunks +10 lines, -0 lines 0 comments Download
M ui/ozone/platform/wayland/wayland_pointer_unittest.cc View 1 2 3 4 5 6 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 43 (24 generated)
denniskempin
3 years, 11 months ago (2017-01-19 23:56:51 UTC) #3
denniskempin
Sadrul, what do you think about this? It's a first step towards processing touch coordinates ...
3 years, 11 months ago (2017-01-20 02:06:48 UTC) #5
tdresser
https://codereview.chromium.org/2648583003/diff/20001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/2648583003/diff/20001/ui/aura/window.cc#newcode447 ui/aura/window.cc:447: gfx::Point floored = gfx::ToFlooredPoint(*point); Do we need to floor ...
3 years, 11 months ago (2017-01-20 16:07:48 UTC) #6
denniskempin
https://codereview.chromium.org/2648583003/diff/20001/ui/aura/window.cc File ui/aura/window.cc (right): https://codereview.chromium.org/2648583003/diff/20001/ui/aura/window.cc#newcode447 ui/aura/window.cc:447: gfx::Point floored = gfx::ToFlooredPoint(*point); On 2017/01/20 16:07:48, tdresser wrote: ...
3 years, 11 months ago (2017-01-20 18:26:33 UTC) #7
denniskempin
Hi Oshima! Could you have a look at the changes in ash?
3 years, 11 months ago (2017-01-20 20:50:19 UTC) #15
sky
This makes me sad. It's a work around for using DIPs. *SIGH* Please add test ...
3 years, 11 months ago (2017-01-20 21:26:37 UTC) #17
reveman
components/exo lgtm quick question, why not do the same in exo code for pointer events?
3 years, 11 months ago (2017-01-20 21:38:24 UTC) #18
oshima
ash lgtm https://codereview.chromium.org/2648583003/diff/60001/components/exo/touch.cc File components/exo/touch.cc (right): https://codereview.chromium.org/2648583003/diff/60001/components/exo/touch.cc#newcode82 components/exo/touch.cc:82: &location); If event system can pass through ...
3 years, 11 months ago (2017-01-20 22:11:55 UTC) #19
sadrul
https://codereview.chromium.org/2648583003/diff/60001/components/exo/touch.cc File components/exo/touch.cc (right): https://codereview.chromium.org/2648583003/diff/60001/components/exo/touch.cc#newcode82 components/exo/touch.cc:82: &location); On 2017/01/20 22:11:54, oshima wrote: > If event ...
3 years, 11 months ago (2017-01-20 22:35:19 UTC) #22
denniskempin
https://codereview.chromium.org/2648583003/diff/60001/components/exo/touch.cc File components/exo/touch.cc (right): https://codereview.chromium.org/2648583003/diff/60001/components/exo/touch.cc#newcode82 components/exo/touch.cc:82: &location); On 2017/01/20 22:35:18, sadrul wrote: > On 2017/01/20 ...
3 years, 11 months ago (2017-01-20 23:22:19 UTC) #23
denniskempin
It works!! Thanks sadrul and oshima! I saw some code in the dispatching path that ...
3 years, 11 months ago (2017-01-21 00:35:48 UTC) #24
sky
https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h File ui/events/event_utils.h (right): https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h#newcode71 ui/events/event_utils.h:71: EVENTS_EXPORT gfx::Point EventLocationFromNative( Do we still call the non-floating ...
3 years, 11 months ago (2017-01-23 16:08:00 UTC) #29
oshima
https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h File ui/events/event_utils.h (right): https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h#newcode70 ui/events/event_utils.h:70: // TODO(tdresser): Return gfx::PointF here. See crbug.com/337827. We should ...
3 years, 11 months ago (2017-01-23 16:34:32 UTC) #30
sky
https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h File ui/events/event_utils.h (right): https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h#newcode70 ui/events/event_utils.h:70: // TODO(tdresser): Return gfx::PointF here. See crbug.com/337827. On 2017/01/23 ...
3 years, 11 months ago (2017-01-23 17:04:06 UTC) #31
reveman
components/exo lgtm still but I'm still curious to why we're not updating exo::Pointer in the ...
3 years, 11 months ago (2017-01-23 17:09:03 UTC) #32
denniskempin
https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h File ui/events/event_utils.h (right): https://codereview.chromium.org/2648583003/diff/100001/ui/events/event_utils.h#newcode71 ui/events/event_utils.h:71: EVENTS_EXPORT gfx::Point EventLocationFromNative( The method is called in a ...
3 years, 11 months ago (2017-01-23 20:36:42 UTC) #33
sky
Dennis and myself IMd offline. He said he would cleanup the unnecessary calls after this ...
3 years, 11 months ago (2017-01-23 21:42:22 UTC) #36
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/2648583003/120001
3 years, 11 months ago (2017-01-23 21:58:24 UTC) #40
commit-bot: I haz the power
3 years, 11 months ago (2017-01-23 22:17:57 UTC) #43
Message was sent while issue was closed.
Committed patchset #7 (id:120001) as
https://chromium.googlesource.com/chromium/src/+/951e1c2407a8055588e51f2f7768...

Powered by Google App Engine
This is Rietveld 408576698