summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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,