Epic: #113 · Milestone: MC4 — Display & 2D
Why
compositor.home (2,158 lines, never run) presents by copying a whole backbuffer to a literal x86 address. The TV shell needs: ≤ 16.6 ms p99 for a full 1080p redraw, partial redraws for focus moves, layer alpha for the OSD, and pacing to the display's vblank. This is the one piece of the GUI stack the media center shares with the desktop plan (MASTER_PLAN §9 layer 2), so it must stay arch- and product-neutral.
Tasks
- Backend interface:
present(buffer, dirty_rects)+wait_vsync()implemented bybochs_vbe(x86 QEMU, no vsync → timer-paced),mailbox_fb(Pi interim),hvs(Pi final, flip). - Layers: opaque UI, alpha OSD/subtitle layer, and a "video hole" (transparent region or separate plane when HVS is present).
- Dirty-rect tracking from Craft draw lists; coalescing; full-frame fallback threshold.
- Software rasterisation primitives with NEON (rungs 12 of #51): fill, blit, alpha-blend, 9-slice, rounded-rect AA, gradient; scalar fallbacks for x86 CI.
- Frame loop: input → layout → paint(dirty) → present, one thread, budget instrumentation (histogram in
perfcommand;fpsoverlay toggle). - Golden-frame tests in QEMU x86 (headless capture via QEMU monitor already used by
fb-boot-log).
Acceptance
QEMU golden tests green; on Pi, full-frame 1080p paint ≤ 8 ms and focus-move partial paint ≤ 2 ms measured by the histogram.
Size: L · Depends on: #73 (for hardware numbers), #51 · Blocks: #92, #101