Repository navigation
fix(馃摳): clear Android view snapshots to transparent - #592
Merged
wcandillon merged 1 commit intoOct 24, 2026
Merged
Conversation
HardwareRenderer is opaque by default and doesn't clear its buffer, so the transparent pixels of a snapshot kept whatever was in it (garbage blocks on Mali GPUs). setOpaque(false) makes it clear to transparent first.
wcandillon
approved these changes
Oct 23, 2026
Owner
|
Thanks a lot for catching this :) |
|
馃帀 This PR is included in version 0.19.1 馃帀 The release is available on:
Your semantic-release bot 馃摝馃殌 |
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.
Fixes #591
HardwareRendereris opaque by default and doesn't clear its buffer before drawing, so on Mali GPUs the transparent areas of a view snapshot keep whatever was in the buffer (opaque garbage blocks around text and icons).setOpaque(false)makes it clear to transparent first, same result as the software fallback's fresh bitmap. Covers both the readback and the zero-copy path since both go throughrenderHardware.Tested on a Solana Seeker (Mali, Android 16) with the same change as a patch on 0.17.0 (
ViewSnapshot.javais the same onmain), the garbage is gone.Before:
seeker-before.mp4
After:
seeker-after.mp4
On the Pixel 10 Pro emulator the snapshots are byte-identical with and without the change.
Didn't add a spec: the emulator's buffers start zeroed, so it would pass without the fix too. Happy to add one if you want it for device runs.