Add per-zone (partial) refresh for the IT8951 display#1
Open
pierrehenrymuller wants to merge 1 commit into
Open
Add per-zone (partial) refresh for the IT8951 display#1pierrehenrymuller wants to merge 1 commit into
pierrehenrymuller wants to merge 1 commit into
Conversation
Author
|
Example: a clock that updates every minute without flashing Render the framebuffer once (cheap thanks to the memset fill()), then push only the rectangle that changed with flush_zone() — it uses the DU waveform, so there is no full-screen flash. Use full_refresh() (GC16) only occasionally, e.g. once a day, to clear any accumulated ghosting. |
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.
Hi,
Thanks a lot for this component, I've been using it daily on a reTerminal E1003.
Here are the per-zone refresh changes I added and validated on my hardware, hope they're useful to you.
Tested on Seeed reTerminal E1003 (10.3", 1872x1404) hardware.
Why
The component only did full-screen GC16 (visible flash, ~1s), fine for the deep-sleep art-frame, but not for an always-on dashboard with frequent updates.
What
full_refresh(): the existing full-screen INIT+GC16 path (unchanged behaviour), now exposed publicly.
render_framebuffer() + flush_zone(x, y, w, h, mode=1): render the framebuffer once, the push only a rectangle with a fast waveform (DU, no flash). Logical coordinates are mapped to panel coordinates (the buffer is X-mirrored) and x/width are aligned to 4 px (4bpp). A counter forces a full GC16 every N partials to clear ghosting.
fill(Color) override using memset instead of the per-pixel base loop (~2.6M draw calls on this 1872x1404 panel) -> the per-frame auto-clear becomes ~instant.
Notes
No change to the existing full-refresh behaviour; the new methods are opt-in, callable from a lambda (e.g. d(my_display).flush_zone(...)).
DU is black/white; periodic GC16 (or the existing deghost) clears ghosting.
Good day