Skip to content

libdmview: unseen boxes draw nothing; dmview keeps the splash screen - #19

Merged
JohnAmadis merged 2 commits into
mainfrom
fix/hidden-boxes-draw-nothing
Oct 11, 2026
Merged

JohnAmadis merged 2 commits into
mainfrom
fix/hidden-boxes-draw-nothing

Conversation

@JaxCalder

@JaxCalder JaxCalder commented Oct 11, 2026 •

Copy link
Copy Markdown

Summary

When a box changed, libdmview redrew it, along with whatever is seen beneath it up to an opaque box or the root, even when the box was not seen. A typical case is a page's screen behind the one shown, with opacity 0.

In carhmi-demo, the speedometer keeps animating on the hidden home screen. Every frame of it redrew the media screen in front of it, including its blurred cover images. Profiled on the STM32F746G-DISCO, dmview was drawing continuously (draw_image, draw_cover, draw_span) while nothing visible changed.

A changed box is now skipped when either:

  • a box around it was not seen when last drawn (seen == 0). When that box's own opacity changes, that box is dirty itself and is redrawn with everything inside it; or
  • the box was not seen itself and its OPACITY still evaluates to 0. This covers a geometry variable, whose change lands on the parent screen. A screen that is fading in is still drawn.

Also: dmview leaves the splash screen when it has no view

The service filled its display black whenever it had no view to show, including at start-up, before any application claimed the display. That wiped the splash screen the display driver shows at boot, leaving a black screen until the application's view arrived. dmod-boot's Renode test of the splash screen fails because of this once the board starts dmview (choco-technologies/dmod-boot#126). Now only a view that was actually shown is cleared away.

Test plan

  • hidden.dmvs gains a bar and a box driven by $tick on the hidden screen. Changing $tick while hidden draws nothing (libdmview_render() == 0). Once the screen is shown, the bar and box are drawn where $tick puts them, and later changes are drawn.
  • The new check fails without the fix and passes with it; all tests pass
  • dmod-boot#126's Renode splash test, once released

🤖 Generated with Claude Code

JohnAmadis and others added 2 commits October 11, 2026 23:42
A changed box was redrawn - with what is seen beneath it, up to an opaque
box or the root - even when it was not seen: a screen of a page behind the
one shown, its opacity 0. The car HMI's speedometer animated on its hidden
home screen, and the media screen in front of it - its blurred cover
images - was drawn again for every frame of it.

A changed box is skipped when a box around it was not seen when last drawn
(that box's own opacity changing redraws it with all inside it), or when it
was not seen itself and its OPACITY still gives 0 - so a screen fading in
is drawn.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The service filled its display black whenever it had no view - also at its
start, before any application claimed the display: the splash screen the
display driver puts up at boot was wiped for a black screen until the
application's view came (dmod-boot's Renode test of the splash screen
failed once the board started dmview). Only a view that was shown is
cleared away now.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@JaxCalder JaxCalder changed the title libdmview: a box that is not seen draws nothing when it changes libdmview: unseen boxes draw nothing; dmview keeps the splash screen Oct 11, 2026
@JohnAmadis
JohnAmadis merged commit 8f3dc88 into main Oct 11, 2026
1 check passed
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.

2 participants