Fix iced_wgpu freezing on empty layers
The `render` method would return when an empty layer is encountered without explicitly dropping the `RenderPass` (necessary because we use `ManuallyDrop`), which would then leak memory and freeze `wgpu` until the surface was recreated.
This commit is contained in:
parent
50ce65b3b7
commit
c7e17391c5
1 changed files with 1 additions and 1 deletions
|
|
@ -236,7 +236,7 @@ impl Backend {
|
||||||
let bounds = (layer.bounds * scale_factor).snap();
|
let bounds = (layer.bounds * scale_factor).snap();
|
||||||
|
|
||||||
if bounds.width < 1 || bounds.height < 1 {
|
if bounds.width < 1 || bounds.height < 1 {
|
||||||
return;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if !layer.quads.is_empty() {
|
if !layer.quads.is_empty() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue