W3C home > Mailing lists > Public > public-pointer-events@w3.org > April to June 2015

Re: [pointerevents] Define event order relative to RAF?

From: Jacob Rossi via GitHub <sysbot+gh@w3.org>
Date: Thu, 25 Jun 2015 04:08:14 +0000
To: public-pointer-events@w3.org
Message-ID: <issue_comment.created-115097172-1435205293-sysbot+gh@w3.org>
We don't throttle our pointer events today. So they get put in our 
queue as soon as the device driver and OS send it to us. That gets 
dispatched when the message loop is pumped.  Our touch events are 
throttled to the vsync (like RAF), however.  

The difference here is a tradeoff between performance and fineness of 
detail.  A painting app might prefer more events per frame for finer 
detail. A game just wants the latest data at the time of the frame.  
Given you can throttle your expensive handling yourself (using a 
library such as you're describing), I prefer the former behavior. That
 said, I think allowing flexibility here on this tradeoff in 
implementations is desirable.

In the scenario of this library, don't you just want to have the 
latest data no matter when it fired?  

Consider our PE implementation (I'll call it "JIT events" :-)). We 
wouldn't want a requirement to guarantee firing events for all 
pointers before the next frame because that could mean arbitrarily 
refiring events with the same data just to meet the requirement.  The 
library should IMO just handle all the events and update pointers 
accordingly.  Then when RAF comes around, it has the freshest data 
possible. Whether all pointers got an event in that frame doesn't much

GitHub Notif of comment by jacobrossi
Received on Thursday, 25 June 2015 04:08:16 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 25 June 2015 04:08:17 UTC