screentinker/android
ScreenTinker 9a630087ff Show the video in a rotated wall panel's screenshot, not a black rectangle
#236 gave each video-wall panel a mounting rotation, which for the first time
puts a real rotation on an ancestor of the ExoPlayer TextureView. The screenshot
compositor could not express that: it pasted the video frame with an axis-aligned
Rect built from getLocationInWindow(), so on a rotated panel the frame landed
outside the capture bitmap entirely. What reached the dashboard was the plain
black that view.draw() leaves wherever a TextureView is — a panel that looks dead
while it is playing perfectly, which is the worst thing a diagnostic can say.

The frame is now placed through the same transform chain the hierarchy was drawn
with, accumulated up the parent chain the way the framework does when it draws a
child, so any ancestor rotation/translation is honoured. The bitmap is also
scaled from the surface's own dimensions rather than assumed to match the view.

Measured on the emulator, a wall panel playing video, remote screenshot vs the
adb framebuffer at the same moment (standard deviation — 0 means a flat frame):

                    before                  after
  rotation 0    sd 0.439 / truth 0.430   sd 0.443 / truth 0.435   (unchanged)
  rotation 90   sd 0     / truth 0.461   sd 0.448 / truth 0.448
  rotation 90   sd 0     / truth 0.467   sd 0.460 / truth 0.457
  rotation 90   sd 0     / truth 0.408   sd 0.463 / truth 0.466

Every rotated capture was #010101 with zero variance before; each now tracks the
real framebuffer. Rotation 0 is unchanged, and so is the ordinary fullscreen
(non-wall) path, re-measured across images and video.

No unit test: this is android.graphics.Matrix semantics against a live view
hierarchy, which the JVM test source set cannot exercise — the evidence is the
before/after measurement above. Android 151/151, server 1298/1298.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Uaeo9MvzKoyXuN6ZsbhtkL
2026-08-06 16:40:48 -05:00
..
app Show the video in a rotated wall panel's screenshot, not a black rectangle 2026-08-06 16:40:48 -05:00
gradle/wrapper Initial open source release 2026-04-08 12:14:53 -05:00
build.gradle.kts Initial open source release 2026-04-08 12:14:53 -05:00
gradle.properties Initial open source release 2026-04-08 12:14:53 -05:00
gradlew Initial open source release 2026-04-08 12:14:53 -05:00
gradlew.bat Initial open source release 2026-04-08 12:14:53 -05:00
settings.gradle.kts Initial open source release 2026-04-08 12:14:53 -05:00