Merge pull request #8501 from penpot/superalex-fix-frame-clipping-artifact

🐛 Fix frame clipping artifact
This commit is contained in:
Elena Torró 2026-03-03 16:16:21 +01:00 committed by GitHub
commit 336095486e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -747,16 +747,17 @@ impl RenderState {
s.canvas().concat(transform);
});
// Hard clip edge (antialias = false) to avoid alpha seam when clipping
// semi-transparent content larger than the frame.
if let Some(corners) = corners {
let rrect = RRect::new_rect_radii(*bounds, corners);
self.surfaces.apply_mut(surface_ids, |s| {
s.canvas()
.clip_rrect(rrect, skia::ClipOp::Intersect, antialias);
s.canvas().clip_rrect(rrect, skia::ClipOp::Intersect, false);
});
} else {
self.surfaces.apply_mut(surface_ids, |s| {
s.canvas()
.clip_rect(*bounds, skia::ClipOp::Intersect, antialias);
.clip_rect(*bounds, skia::ClipOp::Intersect, false);
});
}