Commit 19260d98 authored by Giulio Camuffo's avatar Giulio Camuffo Committed by Giulio Camuffo
Browse files

Fix SHM drawing logic


The old logic didn't care to listen for wl_buffer.release events
so it always drew in the same buffer, potentially resulting in
tearing if the compositor was scanning out the buffer at the same time.
Instead properly cycle between a few buffers and don't reuse the same
one until the release event was received.

The old code also used to throttle the redraws, unless the buffer was
changing, that is unless the window was getting resized. This is now
lost, and no throttling is ever done. Doing it properly, by waiting
for the frame callback before committing the new buffer shows very
noticeable lags with many applications when resizing, because they
paint many times per resize event, so they fall behind the cursor.
A proper fix will be to implement the support for requestUpdate(),
and using it in the applications.

Change-Id: I02732c34769a5c75a6ad68c095bae916e4b274d3
Reviewed-by: default avatarRobin Burchell <robin.burchell@viroteck.net>
parent d316b798
No related merge requests found
Showing with 163 additions and 112 deletions
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment