diff options
author | 2023-08-02 22:05:11 +0200 | |
---|---|---|
committer | 2023-08-02 22:05:11 +0200 | |
commit | c7e17391c53c9aa076d76982189a5184681aac0c (patch) | |
tree | 97635d0607f185343c442060eeeabc11ebbc9f41 /wgpu/src | |
parent | 50ce65b3b7ad10a8537b751b3890d9dcfaecf846 (diff) | |
download | iced-c7e17391c53c9aa076d76982189a5184681aac0c.tar.gz iced-c7e17391c53c9aa076d76982189a5184681aac0c.tar.bz2 iced-c7e17391c53c9aa076d76982189a5184681aac0c.zip |
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.
Diffstat (limited to 'wgpu/src')
-rw-r--r-- | wgpu/src/backend.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wgpu/src/backend.rs b/wgpu/src/backend.rs index 9966a38c..c6a17f2c 100644 --- a/wgpu/src/backend.rs +++ b/wgpu/src/backend.rs @@ -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() { |