Skip to content

fix(boot): only redraw what changed in the graphical menu - #121

Merged
azenla merged 1 commit into
mainfrom
azenla/graphical-menu-performance-96c35f
Oct 4, 2026
Merged

azenla merged 1 commit into
mainfrom
azenla/graphical-menu-performance-96c35f

Conversation

@azenla

@azenla azenla commented Oct 4, 2026

Copy link
Copy Markdown
Member

Drawing a frame of the graphical menu was slow because every tick redrew the whole screen and blitted the entire framebuffer to the display.

The background, title, panel and footer line never change, so they are now drawn once into a cached buffer that each frame starts from. After a frame is drawn it is compared with the one last shown, and only the rows and columns that changed are blitted, with separate rectangles for changes far apart such as the logo and the status line. The first frame still fills the display. The logo scaling also no longer recalculates the source row for every pixel.

This keeps two more full-size buffers per display. I checked it with clippy and rustfmt on both targets but haven't timed it in QEMU yet.

Each frame redrew the whole screen and blitted the entire framebuffer. The static background and panel are now cached, and only the changed regions are blitted.
@azenla
azenla merged commit c6cb96f into main Oct 4, 2026
12 checks passed
@azenla
azenla deleted the azenla/graphical-menu-performance-96c35f branch October 4, 2026 21:22
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