Structure record stack rewinds as scope guards and make reserve unsafe

This commit is contained in:
Dennis Kobert
2026-08-28 18:02:50 +00:00
parent e5b910f840
commit f4d37524c8
15 changed files with 187 additions and 169 deletions
+1 -9
View File
@@ -19,21 +19,13 @@ use raster_types::BitmapMut;
use raster_types::Image;
use raster_types::{CPU, Raster};
#[derive(Clone, Copy, Debug, PartialEq)]
#[derive(Clone, Copy, Debug, PartialEq, dyn_any::DynAny)]
pub struct BrushStampGenerator<P: Pixel + Alpha> {
color: P,
feather_exponent: f32,
transform: DAffine2,
}
// SAFETY: `Static` is `Self` with `P` at its own static projection.
unsafe impl<P: Pixel + Alpha + dyn_any::StaticTypeSized> dyn_any::StaticType for BrushStampGenerator<P>
where
P::Static: Pixel + Alpha,
{
type Static = BrushStampGenerator<P::Static>;
}
impl<P: Pixel + Alpha> Transform for BrushStampGenerator<P> {
fn transform(&self) -> DAffine2 {
self.transform