Convert the raster std and adjustments families to element kernels and keep the unit primary's slot

This commit is contained in:
Dennis Kobert
2026-08-23 16:52:43 +00:00
parent 2c15dc838e
commit 511b4da9f5
8 changed files with 326 additions and 256 deletions
+8 -3
View File
@@ -19,9 +19,14 @@ mod adjust_std {
impl Adjust<Color> for List<Raster<CPU>> {
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
for element in self.iter_element_values_mut() {
for color in element.data_mut().data.iter_mut() {
*color = map_fn(color);
}
element.adjust(&map_fn);
}
}
}
impl Adjust<Color> for Raster<CPU> {
fn adjust(&mut self, map_fn: impl Fn(&Color) -> Color) {
for color in self.data_mut().data.iter_mut() {
*color = map_fn(color);
}
}
}