mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-25 02:57:01 -06:00
Follow-up to #1011, as asked on #1038: a counter of thumbnails actually rendered, and tests that use it. `Textures::thumb_count` is the number of thumbnails *held*. It settles at the rows in view whether the pane rendered them once or a thousand times, so it cannot see a pane that renders the same rows over and over -- which is what #969 was: the flashing white was the rendering, not the holding. `Textures::thumb_renders` counts the renders, and a settled pane is one that has stopped asking for them. The two new tests assert what the held count cannot: - every thumbnail held was rendered, and not many more than that were rendered and thrown away (measured: 8 held, 8 rendered at rest); - ten more frames of the same view render nothing at all; - after a 40,000 pt scroll of an 800-slide deck, 24 renders in total -- the rows it landed on and the ones it passed over, not the deck -- and then it settles again. With the cache made to thrash (its 600-entry limit cut to 4, so the rows in view are evicted and re-rendered every frame), the merged test for the Slide Sorter still passes -- the held count settles at 4 -- while this one fails with "255 renders for 4 thumbnails". That is the hole the counter closes.