From c4505d34de24749a7784bac6f88c964e24a9d6cd Mon Sep 17 00:00:00 2001 From: TimotheusG Date: Mon, 19 Oct 2026 18:47:51 -0400 Subject: [PATCH] test(render): document automatic backend fixtures --- crates/render/src/tests_auto.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/crates/render/src/tests_auto.rs b/crates/render/src/tests_auto.rs index 1e23254c0..22f1a6215 100644 --- a/crates/render/src/tests_auto.rs +++ b/crates/render/src/tests_auto.rs @@ -21,6 +21,7 @@ impl MockAccel { fn new(handle: bool) -> MockAccel { MockAccel { handle, calls: Default::default(), pick: Default::default() } } + /// Number of full-frame requests dispatched to this accelerator. fn calls(&self) -> usize { self.calls.load(Ordering::SeqCst) } @@ -51,6 +52,7 @@ impl Accelerator for MockAccel { } } +/// A small red solid whose centre pixel is shared by the CPU and mock GPU fixtures. fn project() -> (Project, ItemId) { let mut p = Project::default(); p.settings.gpu_acceleration = true; @@ -128,6 +130,7 @@ fn auto_backend_falls_back_when_the_accelerator_declines() { assert!((1..=4).contains(&asked), "asked {asked} times in {n} frames"); } +/// Periodic probes detect a formerly slow GPU becoming faster, without mixing cache keys. #[test] fn auto_pick_follows_changing_costs() { let pick = AutoPick::default();