summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-14 23:14:13 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2025-02-14 23:14:13 +0100
commit7c54bdef1062e4008582d8b1e215ffcc1c1ee016 (patch)
treee78567f950113c8a329852087066ed3ea7a02151
parent7526d73ad3f0c1480e46879159215902e241415d (diff)
downloadiced-7c54bdef1062e4008582d8b1e215ffcc1c1ee016.tar.gz
iced-7c54bdef1062e4008582d8b1e215ffcc1c1ee016.tar.bz2
iced-7c54bdef1062e4008582d8b1e215ffcc1c1ee016.zip
Fix `physical_bounds` shadowing in `wgpu` render
-rw-r--r--wgpu/src/lib.rs9
1 files changed, 6 insertions, 3 deletions
diff --git a/wgpu/src/lib.rs b/wgpu/src/lib.rs
index 9c9fcb31..b1998da7 100644
--- a/wgpu/src/lib.rs
+++ b/wgpu/src/lib.rs
@@ -280,13 +280,16 @@ impl Renderer {
let scale = Transformation::scale(scale_factor);
for layer in self.layers.iter() {
- let Some(scissor_rect) = physical_bounds
- .intersection(&(layer.bounds * scale_factor))
- .and_then(Rectangle::snap)
+ let Some(physical_bounds) =
+ physical_bounds.intersection(&(layer.bounds * scale_factor))
else {
continue;
};
+ let Some(scissor_rect) = physical_bounds.snap() else {
+ continue;
+ };
+
if !layer.quads.is_empty() {
engine.quad_pipeline.render(
quad_layer,