Merge pull request #9391 from penpot/superalex-fix-drag-crop-cache-perf

🐛 Avoid opaque fill check in drag crop cache hot path
This commit is contained in:
Alejandro Alonso 2026-05-06 19:27:58 +02:00 committed by GitHub
commit db1e2a9cfc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1411,16 +1411,10 @@ impl Shape {
}
}
let has_opaque_fill = self
.fills
.iter()
.any(|f| math::is_close_to(f.opacity(), 1.0));
self.blur.is_none()
&& self.shadows.is_empty()
&& (self.opacity - 1.0).abs() <= 1e-4
&& self.blend_mode().0 == skia::BlendMode::SrcOver
&& has_opaque_fill
}
/// Fill + visible strokes in **document space** for clipping interactive drag textures.