Skip to content

Fix transparent background rendering with MULTIPLY Blend mode on Android 34+#2661

Merged
gpeal merged 4 commits intomasterfrom
allen--fix-transparent-background-multiply-blendmode-api34+
Sep 16, 2025
Merged

Fix transparent background rendering with MULTIPLY Blend mode on Android 34+#2661
gpeal merged 4 commits intomasterfrom
allen--fix-transparent-background-multiply-blendmode-api34+

Conversation

@allenchen1154
Copy link
Copy Markdown
Collaborator

The workaround in #2519 for Multiply blend modes doesn't work on Android 34+. This changes the implementation to use BlemdModeCompat.MULTIPLY on Android versions Q (29) and higher where it is supported, while retaining the workaround for older versions.

Fixes #2636 and #2593

Before After
Screenshot_20250912_214839 Screenshot_20250912_214546
Before After
Screenshot_20250912_214850 Screenshot_20250912_214600

…oid 34+

The workaround in #2519 for Multiply blend modes doesn't work on Android 34+. This changes the implementation to use `BlemdModeCompat.MULTIPLY` on Android versions Q (29) and higher where it is supported, while retaining the workaround for older versions.

Fixes #2636
and #2593
@github-actions
Copy link
Copy Markdown

Snapshot Tests
API 23: Report Diff
API 31: Report Diff

@allenchen1154 allenchen1154 requested a review from gpeal September 15, 2025 15:23
@allenchen1154
Copy link
Copy Markdown
Collaborator Author

allenchen1154 commented Sep 15, 2025

Note: This bug is only reproducible when using Hardware rendering.

@github-actions
Copy link
Copy Markdown

Snapshot Tests
API 23: Report Diff
API 31: Report Diff

@github-actions
Copy link
Copy Markdown

Snapshot Tests
API 23: Report Diff
API 31: Report Diff

devices: |
model=Pixel2,version=23,gpu=auto
model=Pixel2,version=31,gpu=auto
model=Pixel2,version=35,gpu=auto
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

35 is the highest level supported at the moment: https://docs.emulator.wtf/emulators/

**Snapshot Tests**
**API 23**: [Report](https://happo.io/a/27/report/${{ env.GITHUB_SHA }}-android23) [Diff](https://happo.io/a/27/p/27/compare/master-android23/${{ env.GITHUB_SHA }}-android23)
**API 31**: [Report](https://happo.io/a/27/report/${{ env.GITHUB_SHA }}-android31) [Diff](https://happo.io/a/27/p/27/compare/master-android31/${{ env.GITHUB_SHA }}-android31) No newline at end of file
**API 31**: [Report](https://happo.io/a/27/report/${{ env.GITHUB_SHA }}-android35) [Diff](https://happo.io/a/27/p/27/compare/master-android35/${{ env.GITHUB_SHA }}-android35)
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updating the post snapshot comment to point to the correct version

@allenchen1154
Copy link
Copy Markdown
Collaborator Author

cc @geomaster

@github-actions
Copy link
Copy Markdown

Snapshot Tests
API 23: Report Diff
API 31: Report Diff

@gpeal gpeal merged commit 479920b into master Sep 16, 2025
7 checks passed
@gpeal gpeal deleted the allen--fix-transparent-background-multiply-blendmode-api34+ branch September 16, 2025 20:59
@allenchen1154 allenchen1154 linked an issue Sep 16, 2025 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Transparent backgrounds not working in Versions > 6.4.0 Rendering (clipping) issue in 6.5.0+

2 participants