Commit 4e75fde
committed
MENU/XMB: render blank-less while icon thumbnails are loading
Complement to the prior deferral commit, addressing the user-visible
"stuttery" feel of playlist icon-thumbnail loading.
xmb_render caps synchronous icon loads at 2 per frame to avoid
frame-time spikes on slow storage (SD card, Android SAF, spinning
rust). That cap itself is fine and is retained here. The problem is
what the dispatcher did to entries past the budget: it set
node->icon_hide = true, and the per-entry draw at line 5534 gated
the entire icon block (including any default-fallback texture) on
!node->icon_hide. So on a playlist with N > 2 visible entries, each
frame drew 2 newly-loaded icons and left the rest as empty slots
until their turn arrived. On a 30-visible-entry playlist that's 15
frames (~250 ms) of icons rippling in against blanks — which reads
as the "stutter" in the original complaint.
This branch was introduced alongside the per-frame cap itself in
2073b8a "XMB: Icon thumbnail improvements" (Feb 2025). Before that,
the dispatcher loaded every visible icon in one frame, and no
icon_hide mechanism existed — budget-exceeded entries just kept
whatever icon they already had (default fallback on first frame).
That pre-regression behaviour is what this commit restores.
Removes node->icon_hide entirely (struct field, init in
xmb_alloc_node, guard in xmb_draw_item, both assignments in
xmb_render). Entries past the per-frame budget still get skipped —
pending_icons is re-raised so we resume next frame — but they render
their existing default icon instead of rendering as nothing. The
paint now fills in rather than pops in.
The 2-per-frame cap is retained, so slow-storage frame-time
protection is unchanged. The render dispatcher comment is updated to
clarify that only synchronous loads count toward the budget; async
requests via gfx_thumbnail_request_stream run on a worker thread and
land via task callback, so they do not contribute to this frame's
work and are correctly uncounted.1 parent 910c8d0 commit 4e75fde
1 file changed
Lines changed: 12 additions & 7 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
302 | 302 | | |
303 | 303 | | |
304 | 304 | | |
305 | | - | |
306 | 305 | | |
307 | 306 | | |
308 | 307 | | |
| |||
646 | 645 | | |
647 | 646 | | |
648 | 647 | | |
649 | | - | |
650 | 648 | | |
651 | 649 | | |
652 | 650 | | |
| |||
5536 | 5534 | | |
5537 | 5535 | | |
5538 | 5536 | | |
5539 | | - | |
5540 | 5537 | | |
5541 | 5538 | | |
5542 | 5539 | | |
| |||
7375 | 7372 | | |
7376 | 7373 | | |
7377 | 7374 | | |
7378 | | - | |
7379 | | - | |
| 7375 | + | |
| 7376 | + | |
| 7377 | + | |
| 7378 | + | |
| 7379 | + | |
| 7380 | + | |
7380 | 7381 | | |
7381 | 7382 | | |
7382 | 7383 | | |
| |||
7396 | 7397 | | |
7397 | 7398 | | |
7398 | 7399 | | |
| 7400 | + | |
| 7401 | + | |
| 7402 | + | |
| 7403 | + | |
| 7404 | + | |
| 7405 | + | |
7399 | 7406 | | |
7400 | 7407 | | |
7401 | | - | |
7402 | 7408 | | |
7403 | 7409 | | |
7404 | 7410 | | |
7405 | 7411 | | |
7406 | 7412 | | |
7407 | 7413 | | |
7408 | 7414 | | |
7409 | | - | |
7410 | 7415 | | |
7411 | 7416 | | |
7412 | 7417 | | |
| |||
0 commit comments