Skip to content

Let LVGL draw TileGrid cells again - #11919

Merged
tannewt merged 3 commits into
adafruit:mainfrom
mikeysklar:lvgl-tilegrid-compose
Nov 19, 2026
Merged

tannewt merged 3 commits into
adafruit:mainfrom
mikeysklar:lvgl-tilegrid-compose

Conversation

@mikeysklar

@mikeysklar mikeysklar commented Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

What

LVGL draws TileGrid cells again, instead of a palette lookup.

Why

@tannewt asked on #11909, so LVGL's accelerators can do the drawing.

Review requests from #11909

Request Status
Draw cells with LVGL, drop the palette lookup Done
No goto Done
Bulk clear, skip cells that are the cleared index Changed cells are cleared one run per tile row. Blank cells were already skipped (skip_blank in _compose)
Auto-refresh should yield too Next PR. It needs an ESP-IDF fix first (espressif/esp-idf#19402)

Results

Metro ESP32-P4, Pi Touch Display 2, scripted playlist scroll, 3 trials.

Playlist scroll before #11909 main this PR
audio speed (1.0 = normal) 0.670 0.993 / 0.996 / 1.000 0.974 / 0.968 / 0.970
audio dropouts 118 3 / 1 / 0 9 / 9 / 11

Slightly slower than the lookup, still far ahead of before.

Written with Claude Code. Measurements are from the hardware runs above.

🤖 Generated with Claude Code

mikeysklar and others added 3 commits November 18, 2026 18:39
This reverts the palette lookup. Compositing stays in LVGL so it can use
the hardware accelerators.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Clear the whole buffer on a full compose, and each run of changed cells
in a tile row otherwise, instead of one lv_draw_buf_clear() per cell.
On ESP each call writes back whole buffer rows from the cache.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Describe how the cell clear works instead of why it changed, fix the
blank-tile comment to match what the buffer is cleared to, and drop the
<string.h> include that nothing uses any more.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I'm excited that the P4 can do the color mapping for us!

@tannewt
tannewt merged commit 19e6e3b into adafruit:main Nov 19, 2026
643 checks passed
@mikeysklar

Copy link
Copy Markdown
Collaborator Author

I'm pumped on color mapping too.

Just to be clear for readers that is only in ESP-IDF master today (eventually 6.2 release).

  • ESP-IDF PPA palette lookup
    • ppa_set_color_lookup_table
    • PPA_BLEND_COLOR_MODE_L4/L8)

The Pixel Processing Accelerator in the ESP32 chips that have can do a lot more than I originally thought.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants