Merge ed5f85e0cdc0dc7a7b8c5e7619d1a641520d9ae4 into 78355421ad73fdcbe93b4acca890b439c4b6f98d

This commit is contained in:
frozolotl 2025-07-22 14:18:45 +02:00 committed by GitHub
commit bbf111f59d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -93,7 +93,7 @@ struct State<'a> {
size: Size,
}
impl State<'_> {
impl<'a> State<'a> {
fn new(size: Size, transform: sk::Transform, pixel_per_pt: f32) -> Self {
Self {
size,
@ -128,9 +128,10 @@ impl State<'_> {
}
/// Sets the current mask.
fn with_mask(self, mask: Option<&sk::Mask>) -> State<'_> {
// Ensure that we're using the parent's mask if we don't have one.
if mask.is_some() { State { mask, ..self } } else { State { mask: None, ..self } }
///
/// If no mask is provided, the parent mask is used.
fn with_mask(self, mask: Option<&'a sk::Mask>) -> State<'a> {
State { mask: mask.or(self.mask), ..self }
}
/// Sets the size of the first hard frame in the hierarchy.