wayland: surface: add function for releasing a buffer

Releasing the current buffer has no major effect because the program is
double-buffered, but add a function to release the buffer anyway.
This commit is contained in:
Richard Acayan 2024-07-24 21:54:14 -04:00
parent a9f3010076
commit 896a02580b

View file

@ -105,6 +105,11 @@ impl<T: Dispatch<WlBuffer, u32>
self.scale = scale;
}
pub fn release(&mut self, id: u32)
{
self.bufs[id as usize].release();
}
pub fn hide(&mut self)
{
self.configured = false;