Re: [pointerevents] Add an API to get pre-coalesced points

[This]( is [now shipping]( in Chrome 58 (stable).

@NavidZ has updated my [eventRate]( demo to draw smaller dots representing the points that come from `getCoalescedEvents`.  Here's a screenshot from a [Samsung Chromebook Plus]( which has a 200hz stylus that (like other touch-like input on ChromeOS) fires events only at 60hz.
![screenshot 2017-05-05 at 3 26 43 pm](

You can see how you can get much smoother curves by considering the coalesced points.  If you introduce some synthetic jank by typing "20" into the "extra work" field, you can see how the main events are impacted but the coalesced points aren't.

@NavidZ has also updated my [event-timing]( test page to show how the timing of the coalesced events lines up with the main event and the frames (though we had a [bug]( in Chrome 58, fixed in 59).  Here's some sample output from Chrome dev channel on Linux (where we have rAF aligned mouse events enabled) with a 120hz mouse.
frame[0]: events 0.8ms
frame[1] 14.9ms: events
frame[2] 16.7ms: events
frame[3] 17.7ms: events 0.2ms(4.5)
frame[4] 16.2ms: events 0.1ms(12.7, 4.7)
frame[5] 16.6ms: events 0.1ms(13.3, 5.3)
frame[6] 16.6ms: events 0ms(13.9, 5.9)
frame[7] 16.7ms: events 0ms(14.6, 6.6)
frame[8] 16.7ms: events 0.1ms(15.3, 7.3)
frame[9] 16.7ms: events 0.1ms(15.9, 7.9)
frame[10] 16.7ms: events 0ms(16.6, 8.6)
frame[11] 16.7ms: events 0ms(17.3, 9.3, 1.3)
frame[12] 16.7ms: events 0ms(9.9, 1.9)
frame[13] 16.7ms: events 0ms(10.6, 2.6)
frame[14] 16.7ms: events 0ms(11.3, 3.3)
frame[15] 16.7ms: events 0ms(11.9, 3.9)
frame[16] 16.7ms: events 0.1ms(12.6, 4.6)

The `frame[x] 16.7ms` shows that (as expected) `requestAnimationFrame` is ticking at a steady 60hz. The 'events 0ms' bit shows how each `pointermove` event is arriving just before `requestAnimationFrame` callbacks.  The relative times in parenthesis show that the `getCoalescedEvents` are coming in at a pretty steady 120hz without any alignment to vsync (there's a slow drift relative to the vsync clock).

GitHub Notification of comment by RByers
Please view or discuss this issue at using your GitHub account

Received on Friday, 5 May 2017 20:33:17 UTC