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:
Héctor Ramón Jiménez 2023-08-02 22:05:11 +02:00
parent 50ce65b3b7
commit c7e17391c5
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -236,7 +236,7 @@ impl Backend {
let bounds = (layer.bounds * scale_factor).snap();
if bounds.width < 1 || bounds.height < 1 {
return;
continue;
}
if !layer.quads.is_empty() {