diff options
| author | Daniel Eklöf <daniel@ekloef.se> | 2023-10-07 14:23:09 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2023-10-10 05:56:27 +0000 |
| commit | c50b1f990093a2a453288b976ef7f6d9a303f793 (patch) | |
| tree | 015ed6f477ea3175191ceeea85505455629ce448 /shm.h | |
| parent | config: log_contextual_errno(): sync with log_contextual() (diff) | |
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.
Diffstat (limited to 'shm.h')
| -rw-r--r-- | shm.h | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -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); |
