Repository navigation
Draw 16-bit images faster - #11633
Merged
Merged
Conversation
A 16-bit Bitmap shown through an RGB565 ColorConverter without dithering reaches a 16-bit display unchanged apart from byte order, so it can take the existing row fast path instead of converting each pixel. Runs of 32 pixels not yet drawn are copied as a block when no transparent color is set. A full-screen 800x480 Bitmap on the ESP32-S31-Korvo-1 refreshes in about 35 ms instead of 255 ms. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
What
16-bit Bitmaps draw faster when colors need no conversion.
Why
Full-screen photos and video refresh slowly on large displays.
Measured on ESP32-S31-Korvo-1 with #11630 applied.
ColorConverterwithRGB565orRGB565_SWAPPED, no dither, 16-bit display, no scale, flip or transposedisplay.refresh()afterbitmap.fill(), ESP32-S31-Korvo-1, median of 10 (min to max)RGB565_SWAPPEDRGB565Palette(256)RGB565_SWAPPEDRGB565The Palette loop is unchanged; its timing shows no slowdown.
Not tested on SPI displays.
AI assistance: written with Claude Code. I ran the hardware tests above.