diff options
author | 2023-06-01 17:12:28 +0200 | |
---|---|---|
committer | 2023-06-01 17:12:28 +0200 | |
commit | 166d350dfc6e8397806002ae6b505e54387517d9 (patch) | |
tree | 8504201c814a873fec812b5b4eacf08055ae0283 /wgpu/src/triangle.rs | |
parent | ce64dcbfd44b59db36575e92428a7cf9c6f58fc7 (diff) | |
download | iced-166d350dfc6e8397806002ae6b505e54387517d9.tar.gz iced-166d350dfc6e8397806002ae6b505e54387517d9.tar.bz2 iced-166d350dfc6e8397806002ae6b505e54387517d9.zip |
Fix empty scissor rectangle in `iced_wgpu::triangle` pipeline
Diffstat (limited to 'wgpu/src/triangle.rs')
-rw-r--r-- | wgpu/src/triangle.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/wgpu/src/triangle.rs b/wgpu/src/triangle.rs index 6cd54ef7..6f32f182 100644 --- a/wgpu/src/triangle.rs +++ b/wgpu/src/triangle.rs @@ -155,6 +155,10 @@ impl Layer { for (index, mesh) in meshes.iter().enumerate() { let clip_bounds = (mesh.clip_bounds() * scale_factor).snap(); + if clip_bounds.width < 1 || clip_bounds.height < 1 { + continue; + } + render_pass.set_scissor_rect( clip_bounds.x, clip_bounds.y, |