Submit queue when maintaining and minimized

This commit is contained in:
João Capucho 2021-06-16 20:22:33 +01:00
parent cb55676bb9
commit 9454c34cc2
No known key found for this signature in database
GPG Key ID: 1AD5CE7CCAEBDA21

View File

@ -600,7 +600,13 @@ impl Renderer {
Ok(()) Ok(())
} }
pub fn maintain(&self) { self.device.poll(wgpu::Maintain::Poll) } pub fn maintain(&self) {
if self.is_minimized {
self.queue.submit(std::iter::empty());
}
self.device.poll(wgpu::Maintain::Poll)
}
/// Create render target views /// Create render target views
fn create_rt_views( fn create_rt_views(