Re: [pointerevents] Consider a simple API for low-latency pointer trails (#204)

We've updated the explainer based on some feedback from internal partners on the API surface, and would love to hear others' thoughts.

Updates include:
- The API now accepts a trusted PointerEvent, instead of x/y coordinates. This serves two purposes:
1. Remove a footgun for developers to send the wrong coordinates
1. Allow the User Agent to grab relevant properties off of the PointerEvent, in the case that more information will be needed in the future
- There is a property to set an element's bounds as a 'clip rect' for the delegated ink trail. This will scope the trail to the appropriate location of the page, and lets developers just set an element rather than dynamically calculating the 'clip rect' in the presence of scrolling, etc.
- There is now some indication of how much latency improvement an author might expect. This goes back to a suggestion by @smaug---- at TPAC that a browser could implement this fully within the application and provide some latency improvement on platforms that do not expose a native API (in fact this will be our plan of attack when prototyping in Chromium). If this is the case we thought it might be useful to authors to be able to take the expected improvement and choose whether or not to continue using the feature.

In terms of the OS API, it is still not yet available (turns out OS release timeframes are quite long). But the general shape is two new methods on a new interface - one method takes information about the application's last rendered ink point (very closely mirrors our `setLastRenderedPoint()` proposal), and another that allows the application to freely feed input to the compositor. Setting the last rendered ink point is associated with a specific swap/present of the backbuffer (the new visual and the swapchain are associated), so that if the application falls behind in ink rendering the window manager can continue to draw the input points that will continue to be fed.

I believe a preview SDK will be available sometime later this spring, at which point I'll link it here.

-- 
GitHub Notification of comment by dlibby-
Please view or discuss this issue at https://github.com/w3c/pointerevents/issues/204#issuecomment-585365778 using your GitHub account

Received on Wednesday, 12 February 2020 19:04:01 UTC