Merge pull request #1893 from iced-rs/fix/mesh-empty-scissor-rect
Fix empty scissor rectangle in `iced_wgpu::triangle` pipeline
This commit is contained in:
commit
44748664c1
1 changed files with 4 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue