Composite remote cursor into the framebuffer when the dashboard toggles it on

This commit is contained in:
Viktor Liu
2026-05-20 12:11:15 +02:00
parent fe15688f20
commit b1b04f9ec6
11 changed files with 269 additions and 3 deletions
+8
View File
@@ -79,6 +79,14 @@ type cursorSource interface {
Cursor() (img *image.RGBA, hotX, hotY int, serial uint64, err error)
}
// cursorPositionSource adds the cursor's current screen-space position to
// cursorSource so the encoder can alpha-blend the sprite into the captured
// framebuffer for "show remote cursor" mode. Implementations should be
// cheap; most platforms already get the position alongside the sprite.
type cursorPositionSource interface {
CursorPos() (x, y int, err error)
}
// errFrameUnchanged is returned by capturers that hash the raw source
// bytes (currently macOS) when the new frame is byte-identical to the
// last one, so the encoder can short-circuit to an empty update.