Commit 910c8d0
committed
MENU/XMB: defer xmb_populate_dynamic_icons until horizontal tab animation settles
On rapid left/right traversal across a row of playlist tabs, each
intermediate tab would get a full xmb_populate_dynamic_icons pass —
xmb_unload_icon_thumbnail_textures (loop over every node resetting
icon textures, cancel in-flight requests, clear pending_icons)
followed by xmb_refresh_visible_icon_paths (loop over visible entries
writing path_data) — only to be clobbered by the next tab's pass
~16 ms later. None of the intermediate work ever renders anything
the user sees, because the tab-switch animation is still mid-flight
when the next step arrives.
Defer the work via a new `pending_dynamic_icons_repopulate` flag:
xmb_populate_entries sets it instead of calling the function directly;
xmb_render fires it once per frame, but only when the horizontal tab
animation has settled (categories_x_pos has reached its target — a
reliable predicate now that tweens on that float are tagged and
kill-before-pushed, from the prior commit).
Effects on rapid tab traversal:
- Each intermediate populate_entries just re-sets the flag (idempotent).
- xmb_render skips firing while categories_x_pos is still tweening.
- Only once animation settles on the final tab does the unload +
refresh actually run, with is_playlist / menu_icon_thumbnails
gates re-checked at fire time so the *current* landing tab's
state decides what happens.
- If the user navigated away from a playlist during the animation
(e.g. to settings), the else-if unload branch from populate_entries
runs instead.
Cleared in two places to avoid stale-fire hazards:
- xmb_context_reset_internal does a synchronous populate and clears
the flag so xmb_render doesn't redundantly repeat the work a few
frames later when the animation settles.
- xmb_context_destroy clears the flag because the matching
context_reset_internal will repopulate synchronously; firing
between destroy and reset would walk the selection list with
already-reset thumbnail state only to have it wiped again.
No effect on the common case of simple cursor navigation within a
single playlist: categories_x_pos is already at target when
populate_entries fires, so the deferred work runs on the next render
frame — essentially immediate.1 parent 04099df commit 910c8d0
1 file changed
Lines changed: 58 additions & 2 deletions
File tree
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
468 | 468 | | |
469 | 469 | | |
470 | 470 | | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
471 | 478 | | |
472 | 479 | | |
473 | 480 | | |
| |||
3480 | 3487 | | |
3481 | 3488 | | |
3482 | 3489 | | |
3483 | | - | |
3484 | | - | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
| 3494 | + | |
| 3495 | + | |
3485 | 3496 | | |
3486 | 3497 | | |
3487 | 3498 | | |
| |||
6957 | 6968 | | |
6958 | 6969 | | |
6959 | 6970 | | |
| 6971 | + | |
| 6972 | + | |
| 6973 | + | |
| 6974 | + | |
| 6975 | + | |
| 6976 | + | |
6960 | 6977 | | |
| 6978 | + | |
6961 | 6979 | | |
6962 | 6980 | | |
6963 | 6981 | | |
| |||
7018 | 7036 | | |
7019 | 7037 | | |
7020 | 7038 | | |
| 7039 | + | |
| 7040 | + | |
| 7041 | + | |
| 7042 | + | |
| 7043 | + | |
| 7044 | + | |
| 7045 | + | |
| 7046 | + | |
| 7047 | + | |
| 7048 | + | |
| 7049 | + | |
| 7050 | + | |
| 7051 | + | |
| 7052 | + | |
| 7053 | + | |
| 7054 | + | |
| 7055 | + | |
| 7056 | + | |
| 7057 | + | |
| 7058 | + | |
| 7059 | + | |
| 7060 | + | |
| 7061 | + | |
| 7062 | + | |
| 7063 | + | |
| 7064 | + | |
| 7065 | + | |
| 7066 | + | |
| 7067 | + | |
| 7068 | + | |
| 7069 | + | |
7021 | 7070 | | |
7022 | 7071 | | |
7023 | 7072 | | |
| |||
9832 | 9881 | | |
9833 | 9882 | | |
9834 | 9883 | | |
| 9884 | + | |
| 9885 | + | |
| 9886 | + | |
| 9887 | + | |
| 9888 | + | |
| 9889 | + | |
| 9890 | + | |
9835 | 9891 | | |
9836 | 9892 | | |
9837 | 9893 | | |
| |||
0 commit comments