wayland: Fix buffer age
We need to reset the age of the *new* front buffer to 1, not the old one. It turns out they're easy to mix up right when you're about to swap them.
This commit is contained in:
parent
ef49741254
commit
d26ae5b895
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