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:
@@ -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(),
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user