♻️ Refactor some allocations

This commit is contained in:
Aitor Moreno 2025-06-04 13:53:27 +02:00
parent 4f7d97a31e
commit 8922e7454f
9 changed files with 183 additions and 12 deletions

View file

@ -218,15 +218,15 @@ impl Shape {
constraint_h: None,
constraint_v: None,
clip_content: true,
fills: vec![],
strokes: vec![],
fills: Vec::with_capacity(1),
strokes: Vec::with_capacity(1),
blend_mode: BlendMode::default(),
opacity: 1.,
hidden: false,
blur: Blur::default(),
svg: None,
svg_attrs: HashMap::new(),
shadows: vec![],
shadows: Vec::with_capacity(1),
layout_item: None,
extrect: OnceCell::new(),
}