Files
vectorcraft/crates
dotCooCoo 502d264853 Canvas: render worker tests no longer depend on wall-clock time
In unit tests the canvas no longer starts render worker threads, so every
frame renders on the UI thread, as with VECTORCRAFT_SYNC_RENDER set and as
the thumbnail worker already does. Before, any canvas test that drew
without its own worker raced real threads, the first frame waited a real
16 ms for the worker, and the measured render time decided whether the
next frame counted as slow.

- raster.rs: the first-frame wait and the render time go through
  first_frame_grace() and render_ms(). In tests they read thread-locals
  (no wait, 1 ms), so a frame's outcome is the same on every run.
- panes/tests.rs: wait_ready no longer sleeps 5 ms per frame for up to
  400 frames. The pane pictures render in the frame that asks (the test
  context runs background jobs inline), so it runs at most 4 frames.
- canvas/tests.rs: the_render_worker_waits_for_a_frame_only_as_long_as_asked
  checks the time-up case with a zero wait and the late frame with a
  barrier and an unbounded wait, in place of a 30 ms sleep, an elapsed
  time assertion and 5 s bounds.
- New test: a first frame the worker finishes within the wait shows in
  the frame that queued it.
2026-11-27 16:46:40 -08:00
..
…
…
…