Avoid flushing empty layers in iced_wgpu and iced_glow
This commit is contained in:
parent
4a11cbd994
commit
687c35e052
2 changed files with 9 additions and 0 deletions
|
|
@ -79,6 +79,11 @@ impl Backend {
|
|||
target_height: u32,
|
||||
) {
|
||||
let mut bounds = (layer.bounds * scale_factor).snap();
|
||||
|
||||
if bounds.width < 1 || bounds.height < 1 {
|
||||
return;
|
||||
}
|
||||
|
||||
bounds.height = bounds.height.min(target_height);
|
||||
|
||||
if !layer.quads.is_empty() {
|
||||
|
|
|
|||
|
|
@ -119,6 +119,10 @@ impl Backend {
|
|||
) {
|
||||
let bounds = (layer.bounds * scale_factor).snap();
|
||||
|
||||
if bounds.width < 1 || bounds.height < 1 {
|
||||
return;
|
||||
}
|
||||
|
||||
if !layer.quads.is_empty() {
|
||||
self.quad_pipeline.draw(
|
||||
device,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue