mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-04-06 07:15:30 -04:00
render: more fine-grained wayland surface damage tracking
Before this patch. Wayland surface damage tracking was done on a per-row basis. That is, even if just one cell was updated, the entire row was "damaged". Now, damage is per cell. This hopefully results in lower latencies in many use cases, and especially on high DPI monitors.
This commit is contained in:
parent
1c9d98d57e
commit
c50b1f9900
4 changed files with 75 additions and 50 deletions
13
shm.h
13
shm.h
|
|
@ -24,7 +24,18 @@ struct buffer {
|
|||
|
||||
unsigned age;
|
||||
|
||||
pixman_region32_t dirty;
|
||||
/*
|
||||
* First item in the array is used to track frame-to-frame
|
||||
* damage. This is used when re-applying damage from the last
|
||||
* frame, when the compositor doesn't release buffers immediately
|
||||
* (forcing us to double buffer)
|
||||
*
|
||||
* The remaining items are used to track surface damage. Each
|
||||
* worker thread adds its own cell damage to "its" region. When
|
||||
* the frame is done, all damage is converted to a single region,
|
||||
* which is then used in calls to wl_surface_damage_buffer().
|
||||
*/
|
||||
pixman_region32_t *dirty;
|
||||
};
|
||||
|
||||
void shm_fini(void);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue