Merge pull request #1996 from iced-rs/fix/wgpu-freeze
Fix `iced_wgpu` freezing on empty layers
This commit is contained in:
commit
f7ca420817
2 changed files with 6 additions and 2 deletions
|
|
@ -78,6 +78,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
- `Tooltip` overlay position inside `Scrollable`. [#1978](https://github.com/iced-rs/iced/pull/1978)
|
||||
- `BorderRadius` not exposed in root crate. [#1972](https://github.com/iced-rs/iced/pull/1972)
|
||||
- Outdated `ROADMAP`. [#1958](https://github.com/iced-rs/iced/pull/1958)
|
||||
- `iced_wgpu` freezing on empty layers. [#1996](https://github.com/iced-rs/iced/pull/1996)
|
||||
|
||||
Many thanks to...
|
||||
|
||||
|
|
|
|||
|
|
@ -87,7 +87,10 @@ impl Backend {
|
|||
let transformation = viewport.projection();
|
||||
|
||||
let mut layers = Layer::generate(primitives, viewport);
|
||||
layers.push(Layer::overlay(overlay_text, viewport));
|
||||
|
||||
if !overlay_text.is_empty() {
|
||||
layers.push(Layer::overlay(overlay_text, viewport));
|
||||
}
|
||||
|
||||
self.prepare(
|
||||
device,
|
||||
|
|
@ -236,7 +239,7 @@ impl Backend {
|
|||
let bounds = (layer.bounds * scale_factor).snap();
|
||||
|
||||
if bounds.width < 1 || bounds.height < 1 {
|
||||
return;
|
||||
continue;
|
||||
}
|
||||
|
||||
if !layer.quads.is_empty() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue