wayland: Reuse buffers and pools; check buffer release

Also updates `winit` example to redraw on resize, which seems to be
necessary.

With this resizing seems to be entirely smooth, without visual
corruption from it overwriting the buffer the server is displaying.
This commit is contained in:
Ian Douglas Scott 2022-12-20 14:24:29 -08:00 committed by Jeremy Soller
parent 9b8641fc07
commit cdfae58510
3 changed files with 165 additions and 98 deletions

View file

@ -54,6 +54,12 @@ fn main() {
} if window_id == window.id() => {
*control_flow = ControlFlow::Exit;
}
Event::WindowEvent {
event: WindowEvent::Resized(_),
window_id,
} if window_id == window.id() => {
window.request_redraw();
}
_ => {}
}
});