Store paint content in its native form

This commit is contained in:
Dennis Kobert
2026-08-27 12:33:28 +00:00
parent 34ea9c59fd
commit 79f3571b02
4 changed files with 84 additions and 10 deletions

View File

@@ -311,14 +311,12 @@ fn default_gradient_paint(paint: &mut List<Graphic>, bounds: Option<[DVec2; 2]>,
}
}
/// The materialized paint level as the canonical paint table.
/// The materialized paint level as the canonical owned paint list, content
/// kept in its native form.
fn paint_table(paint: core_types::node::List<'_, Graphic>) -> List<Graphic> {
// SAFETY: a materialized input's frames are arena-resident.
let item = unsafe { core_types::record::GroupItem::from_resident(paint.batch()) };
graphic_types::graphic::group_to_legacy_list(&core_types::record::Group {
row: None,
content: core_types::record::GroupContent::Run(item),
})
graphic_types::graphic::run_to_list::<Graphic>(&item).expect("a paint level holds graphic lanes")
}
/// Applies a fill style to the vector content, giving an appearance to the area within the interior of the geometry.