iris: separate layout allocation from lengths

This commit is contained in:
iris committed 2026-09-12 19:35:18 -04:00
1 parent 2b9d8c49a0
commit 1f15125992
17 files changed
+395 -168

No files matched your search

+4 -4
View File
@@ -140,7 +140,7 @@ fn bench_input_grows(n: usize, lines: usize) {
let input_area = rsc.ui.widgets.add_strong(Sized {
inner: input_rect.any(),
x: None,
y: Some(abs(line_height)),
y: Some(abs(line_height).into()),
});
let input_area_weak = input_area.weak();
@@ -162,7 +162,7 @@ fn bench_input_grows(n: usize, lines: usize) {
let mut total_moves = 0u64;
for line in 1..=lines {
rsc.ui.widgets.get_mut(&input_area_weak).unwrap().y =
Some(abs(line_height * (line + 1) as f32));
Some(abs(line_height * (line + 1) as f32).into());
let start = Instant::now();
render.update(&root, &mut rsc);
total += start.elapsed();
@@ -253,7 +253,7 @@ fn bench_expand_holds_edge(n: usize, growths: usize) {
let sized = rsc.ui.widgets.add_strong(Sized {
inner: rect.any(),
x: None,
y: Some(abs(40.0)),
y: Some(abs(40.0).into()),
});
growable = Some(sized.weak());
list.push_back(LazyItem::new(i as u64, sized.any()));
@@ -287,7 +287,7 @@ fn bench_expand_holds_edge(n: usize, growths: usize) {
.unwrap()
.note_tap(top + 1.0);
}
rsc.ui.widgets.get_mut(&growable).unwrap().y = Some(abs(height));
rsc.ui.widgets.get_mut(&growable).unwrap().y = Some(abs(height).into());
let start = Instant::now();
render.update(&root, &mut rsc);
total += start.elapsed();