Wayland Relative Pointer API Progress
x414e54 at linux.com
Sun Jul 19 06:06:25 PDT 2015
On Wed, Jul 15, 2015 at 9:09 PM, Daniel Stone <daniel at fooishbar.org> wrote:
> I haven't read the vast majority of this thread, but this isn't really
> true. There's nothing special about the cursor in drawing: just hide
> the cursor, create a small subsurface with SHM buffers, and Weston
> will use the hardware cursor as it would for an actual cursor surface.
> Problem solved.
Even with subsurfaces GUI applications really should not push their
own cursors around as they cannot control the latency between the user
moving the mouse and receiving the event. Think about x11 forwarding
where the window is actually composited locally but running on a
remote server. You would loose the benefit over using a frame based
protocol such as VNC. It is not abnormal to have 50-100ms latency to a
remote server. Sure you are always going to have a lag once you click
a button and wait for the remote application to respond but at least
the user knows where the mouse was when they clicked.
Also what Bill was talking about was syncing the exact position of the
mouse to the rendered graphics (running a subsurface in synced mode)
which not only means the mouse will be skipping frames you will have
issues because SwapBuffers is asynchronous so you could end up
overwriting the state cache for the cursor position. You would have to
stick a fence in the gl command queue and wait before you called
set_position. In this case your graphics pipeline would be faster if
you just did a blit or texture draw because there is no CPU/GPU sync
This is kind of giving me headache now so I will make this my last comment here.
More information about the wayland-devel