mirror of
https://github.com/storytold/lightcraft.git
synced 2026-10-14 19:27:01 -04:00
GH-104: finish initial layout before offline frame timing
Finish the initial UI layout and assert font readiness before timing the existing views. Preserve the 300 ms limit and final probe assertions. Co-authored-by: Codex <[email protected]>
This commit is contained in:
commit
594362d717
2 files changed
+6
-2
No files matched your search
@@ -247,8 +247,9 @@ fn fill_box(src: &mut [[f32; 3]], tgt: &[[f32; 3]], alpha: &[f32], bw: usize, bh
|
||||
let flat: Vec<f32> = tgt.iter().flatten().copied().collect();
|
||||
let out = lightcraft_inpaint::complete(bw, bh, 3, &flat, &hole, &lightcraft_inpaint::CompleteParams::default())
|
||||
.unwrap_or_else(|| lightcraft_inpaint::membrane_fill(bw, bh, 3, &flat, &hole));
|
||||
for (d, v) in src.iter_mut().zip(out.chunks_exact(3)) {
|
||||
*d = [v[0], v[1], v[2]];
|
||||
let (pixels, _) = out.as_chunks::<3>();
|
||||
for (d, v) in src.iter_mut().zip(pixels) {
|
||||
*d = *v;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -76,6 +76,9 @@ fn offline_originals_never_block_a_frame() {
|
||||
let ui_thread = std::thread::current().id();
|
||||
h.app.ui.view = ViewMode::PhotoGrid;
|
||||
h.step();
|
||||
// The first frame installs fonts; finish the first layout before timing the views.
|
||||
h.step();
|
||||
assert!(h.app.fonts_ready, "the UI is initialized before frame timing starts");
|
||||
assert!(h.app.session.media.availability.is_background(), "the app checks files off the UI thread");
|
||||
|
||||
// the grid: every cell asks for its thumbnail (which asks whether the original is there)
|
||||
|
||||
Reference in new issue
Block a user