Merge pull request #191 from rust-windowing/wayland-buffer-age-fix
wayland: Fix buffer age
This commit is contained in:
commit
2b1bb980d2
1 changed files with 3 additions and 3 deletions
|
|
@ -186,14 +186,14 @@ impl<D: HasDisplayHandle + ?Sized, W: HasWindowHandle> WaylandImpl<D, W> {
|
|||
.dispatch_pending(&mut State);
|
||||
|
||||
if let Some((front, back)) = &mut self.buffers {
|
||||
// Swap front and back buffer
|
||||
std::mem::swap(front, back);
|
||||
|
||||
front.age = 1;
|
||||
if back.age != 0 {
|
||||
back.age += 1;
|
||||
}
|
||||
|
||||
// Swap front and back buffer
|
||||
std::mem::swap(front, back);
|
||||
|
||||
front.attach(self.surface.as_ref().unwrap());
|
||||
|
||||
// Like Mesa's EGL/WSI implementation, we damage the whole buffer with `i32::MAX` if
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue