Repository navigation
Backdrop: the pattern tile repeated to Metrics::pattern_px (64 px on the Tab5) - #1
Merged
Merged
Conversation
LVGL draws an LV_IMAGE_ALIGN_TILE image one tile at a time, through the whole image pipeline per tile. With one period per tile (6x6 dot matrix, 8x4 scanlines, ...) a 1280x720 backdrop took ~25,600 draws per full redraw and ~7,000 per list scroll, each copying rows of 12-16 bytes. make_tile() now repeats the period to at least Metrics::pattern_px a side (a multiple of the period on both axes, so the pattern is unchanged). large_1280x720() asks for 64 px: a few hundred draws per full redraw, ~9 KB per console style shown (tiles are kept, as before). compact_320x240() keeps one period (0), as on the box today. Measured on the Tab5 (20 s of scrolling, LVGL REFR_START..REFR_READY): average redraw 57.1 -> 37.2 ms, the slowest 164 -> 96 ms; 128 px tiles measured the same (38.2 ms) at four times the memory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The launcher's and the pause menu's backdrop draws its pattern as an
LV_IMAGE_ALIGN_TILEimage. LVGL draws a tiled image one tile at a time, running the whole image pipeline for each tile. With one pattern period per tile (6x6 dot matrix, 8x4 scanlines, up to 22x22 dots), a 1280x720 backdrop cost about 25,600 draws per full redraw and about 7,000 per list scroll. Each draw copied rows of only 12 to 44 bytes. On the Tab5 that was the largest single cost of a launcher redraw.make_tile()now repeats the period to at leastMetrics::pattern_pxon each side. The tile is always a multiple of the period on both axes, so the pattern looks the same.Metrics::pattern_pxis a new field:large_1280x720()uses 64, giving a few hundred draws per full redraw. Each console style shown costs about 9 KB, and tiles are kept as before.compact_320x240()uses 0 (one period), so the box is unchanged.Backdrop::create(parent, pattern_px)andpattern_tile(style, min_px)both take the size; it defaults to 0.Measurements (Tab5)
I scrolled the launcher for 20 s and timed each LVGL refresh, from
REFR_STARTtoREFR_READY:The 128 px tiles are no faster and take four times the memory, so the default is 64.
Testing
🤖 Generated with Claude Code
https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY