Skip to content

Touch point markers, switchable while the compositor runs - #2

Open
wayne-tbl wants to merge 3 commits into
FuriLabs:forkyfrom
wayne-tbl:screen-capture
Open

Touch point markers, switchable while the compositor runs#2
wayne-tbl wants to merge 3 commits into
FuriLabs:forkyfrom
wayne-tbl:screen-capture

Conversation

@wayne-tbl

@wayne-tbl wayne-tbl commented Aug 16, 2026

Copy link
Copy Markdown

Touch point markers a screen recording can show, switchable while the
compositor is running.

Updated at review request (21 Aug): everything this fork changes about the
markers is behind IS_FURIOS — see below.

  • server: allow toggling debug flags at runtime — the flags are otherwise
    parsed once from PHOC_DEBUG at startup, which is no use to anything that
    wants one for a moment and off again afterwards.
  • renderer: draw touch points as discs — approximated with horizontal slices
    inside the existing render pass rather than a shader, and shrunk to a resting
    size shortly after the finger goes down, so a recording shows the tap rather
    than a static dot. All of it behind IS_FURIOS.
  • desktop: add a touch-points gsetting — lets a recording show what was
    pressed and put the markers away afterwards without restarting the
    compositor. Nothing appears or clears until a frame is asked for, since the
    markers are drawn from the render pass.

IS_FURIOS

#define IS_FURIOS 1 sits by the includes in src/render.c, following the
pattern of FuriLabs/phosh f559f26b. color_hsv_to_rgb() and upstream's
render_touch_point_cb() stay in the file byte-identical to forky,
built under #else; ours build under #if IS_FURIOS. Setting it to 0 builds
upstream's markers back. phoc_box_from_touch_point() is unchanged and shared
by both.

The diff to render.c is +91 lines and 0 deletions against forky.

One upstream line does change: TOUCH_POINT_SIZE becomes conditional, 60 for
the discs and upstream's 20 otherwise. damage_touch_point_cb() sizes its
damage box from it, so leaving it at 20 would damage less than the discs draw.

Both settings of the switch compile with no warnings, and meson test is
17/17 including check-indent.

Pairs with the screen recorder quick setting in phosh
(FuriLabs/phosh, branch screen-capture), whose Show Touches option writes
this touch-points key. Neither breaks without the other — the option is
simply inert until phoc has the key.

3 commits, off forky. Tested on an FLX1.

The flags are otherwise parsed once from PHOC_DEBUG at startup, which is
no use to anything that wants one for a moment and off again afterwards.

Signed-off-by: wayne <wayne@furilabs.com>
Approximated with horizontal slices inside the existing render pass
rather than a shader, and shrunk to a resting size shortly after the
finger goes down so a recording shows the tap rather than a static dot.

All of it sits behind IS_FURIOS, so upstream's color_hsv_to_rgb() and
render_touch_point_cb() stay in the file unchanged and building them
back is a one-line change. Both settings of the switch compile warning
free.

Signed-off-by: wayne <wayne@furilabs.com>
Lets a screen recording show what was pressed and put the markers away
afterwards, without restarting the compositor. The markers are drawn from
the render pass, so nothing appears or clears until a frame is asked for.

Signed-off-by: wayne <wayne@furilabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant