From 3b28e720d2729a76bee185d34650f1d164c79067 Mon Sep 17 00:00:00 2001 From: Mariano Abad Date: Sun, 6 Sep 2026 20:16:24 -0300 Subject: [PATCH] docs(drm): say what the 180 measurement actually showed The loop asserts the old mapping was wrong at 180 too, and that is true of the mapping, but master never ran it there: the clamp sent 180 down the untouched branch, so guess and sprite turned together and the hotspot landed on the tip. The bench measured exactly that - (0,0) at 180, with only the sprite upside down. The comment said the old flow was wrong at every angle without that distinction, which is the kind of gap between a claim and a measurement worth closing before someone else finds it. --- src/server/drm_capturer.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/server/drm_capturer.rs b/src/server/drm_capturer.rs index 260b6b12a..8041650a5 100644 --- a/src/server/drm_capturer.rs +++ b/src/server/drm_capturer.rs @@ -1988,8 +1988,13 @@ mod drm_capturer_tests { // scanned out and only afterwards mapped as if it were a point on it: the guess picks the // top-left of the opaque box, and a turned arrow's tip is not in that corner - at 90 the // error is the arrow's WIDTH along x, small enough to pass as fine; at 270 it is its HEIGHT - // along y, which is the one that got reported. This test covers the second cause; the sprite - // itself is covered by the two below. + // along y, which is the one that got reported. + // + // The 180 entry below is about that mapping, not about what was seen: on master the clamp sent + // 180 down the untouched branch, so the guess and the sprite were turned together and the + // hotspot landed on the tip anyway - measured as (0,0) there, with only the sprite wrong. What + // the loop shows is that the guess is not a point that survives being mapped, at any angle. + // This test covers the mapping; the sprite is covered by the two below. #[test] fn a_guessed_hotspot_is_guessed_on_the_upright_sprite() { use scrap::drm_reader::infer_hotspot;