Skip to content

0688200

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 21 Nov 18:25

perf(desktop): Draw a dragged selection box once a frame, by its edges

Dragging a selection box across the desktop redrew the launcher layer on
every pointer event, hundreds a second from a browser, and each frame
cleared and painted the whole box: its fill, its stroked edge, and every
icon under it, then copied it into the surface's buffer for the
compositor to upload and encode. A large box held the shell near a core.

The backgrounds now draw no sooner than a frame period after their last
frame (Desktop::background_due, ui::FRAME, as the bar and the
notification cards pace), a change after a pause still drawn at once, so
an icon dragged across the desktop is paced the same way. A box dragged
from its corner changes only along its edges, so its frame redraws the
strips between the old box's edges and the new one's (band_strips),
each grown to the whole of any icon it reaches (whole_icons) so no icon
is drawn cut by a clip, and the box's edge is four plain fills rather
than a stroked path, which under a strip's clip cost a mask of the
whole layer.