Repository navigation
1204: exact damage per frame for SCFB (flag DAMAGE), on all drawing threads - #23
Merged
Merged
Conversation
MiniIOMobileFramebuffer marked the whole panel dirty on every swap, so the Scion app (scion #123) copied 11 MB per frame. With SCFB it now keeps a cached shadow of the panel: drawRows compares each new row with it (the changed span of an unscaled row, pixel by pixel when scaling), writes only the changes to the shadow and the panel, and folds its bounds into the frame's damage with lock-free min/max, so the row shares stay on all helper threads (unlike fDiff). The frame is published with that rectangle and flag bit 2 (DAMAGE: exact; empty means nothing changed). The first frame after the text console is published whole. Without SCFB nothing changes. Co-Authored-By: Claude Opus 5.5 <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.
Until now, MiniIOMobileFramebuffer marked the whole panel dirty on every swap, so Scion's damage-only copy (scion #123) had nothing to save.
How it works now
drawRowscompares each new row with the shadow: the changed span of an unscaled row, or pixel by pixel when scaling. It writes only the changes to the shadow and the panel. The panel's write-combined memory is never read, and fewer bytes are written to it.fDiffforces a single thread.DAMAGE.QEMU (hvf), iOS 16.5 home screen
flags=5and a damage rectangle of about 30×80 px, around the Clock icon's second hand.dirty=(0,0,0,0)), which the app now skips.Also
qemu-tap.pynow takes its port from$QMP. Without that, with two QEMUs running, a tap went to the other one.Docs: scion-avf#21 (SCFB.md, bit 2).
🤖 Generated with Claude Code