Skip to content

fix(馃摳): clear Android view snapshots to transparent - #592

Merged
wcandillon merged 1 commit into
wcandillon:mainfrom
jstnw10:fix/android-view-snapshot-transparent
Oct 24, 2026
Merged

wcandillon merged 1 commit into
wcandillon:mainfrom
jstnw10:fix/android-view-snapshot-transparent

Conversation

@jstnw10

@jstnw10 jstnw10 commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Fixes #591

HardwareRenderer is 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 through renderHardware.

Tested on a Solana Seeker (Mali, Android 16) with the same change as a patch on 0.17.0 (ViewSnapshot.java is the same on main), 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.

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

Copy link
Copy Markdown
Owner

Thanks a lot for catching this :)

@wcandillon
wcandillon merged commit 6db6720 into wcandillon:main Oct 24, 2026
5 checks passed
@github-actions

Copy link
Copy Markdown

馃帀 This PR is included in version 0.19.1 馃帀

The release is available on:

Your semantic-release bot 馃摝馃殌

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] drawElementImageToTexture: transparent areas show garbage on Mali GPUs

2 participants