Nest age declaration inside last_primitives
This commit is contained in:
parent
b6b3e9b9f9
commit
150ce65e20
1 changed files with 2 additions and 2 deletions
|
|
@ -165,9 +165,9 @@ pub fn present<T: AsRef<str>>(
|
|||
.buffer_mut()
|
||||
.map_err(|_| compositor::SurfaceError::Lost)?;
|
||||
|
||||
let age = buffer.age();
|
||||
|
||||
let last_primitives = {
|
||||
let age = buffer.age();
|
||||
|
||||
surface.max_age = surface.max_age.max(age);
|
||||
surface.primitive_stack.truncate(surface.max_age as usize);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue