Skip to content

Commit

Permalink
Fix iced_wgpu freezing on empty layers
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
hecrj committed Aug 2, 2023
1 parent 50ce65b commit c7e1739
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion wgpu/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit c7e1739

Please sign in to comment.