Skip to content

Commit

Permalink
Avoid empty overlay layer in iced_wgpu
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Aug 2, 2023
1 parent c7e1739 commit a7609a7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion wgpu/src/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit a7609a7

Please sign in to comment.