Fix damage issue when multiple buffers are in use

wldash was originally written to expect server-side shm buffer
optimizations, which make it so only a single buffer has to be in use.
This simplifies damage tracking and repaint needs.

Support for using multiple buffers was added to support e.g., jay, but
the damage handling was not in place for this to work. Fix that by
tracking damage per buffer.
This commit is contained in:
Kenny Levinsen
2025-02-27 16:38:52 +01:00
parent 40aec97f79
commit 9fd054fc2c
2 changed files with 16 additions and 10 deletions
+2
View File
@@ -83,6 +83,7 @@ pub struct ShmBuffer {
pub buffer: wl_buffer::WlBuffer,
pub refcnt: u32,
pub id: u32,
pub last_damage: Vec<Geometry>,
}
impl ShmBuffer {
@@ -111,6 +112,7 @@ impl ShmBuffer {
mmap,
buffer,
id,
last_damage: Vec::new(),
})
}