Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix black background on android #228

Conversation

alanjhughes
Copy link
Contributor

@alanjhughes alanjhughes commented Sep 16, 2024

Overview

Closes #226
Calling setLayerType from setRenderingMode and passing null as the paint reference will cause the default paint to be used which will have it's PorterDuffXfermode set to SRC_OVER. This causes the incorrect result.

I've added a new mRenderingMode property that is used to call setLayerType from dispatchDraw where we have a paint reference with the correct PorterDuffXfermode set.

Test Plan

I've updated the example app to use 0.75 and tested both platforms on both architectures.

@samueljim
Copy link

LGTM

@samueljim
Copy link

I'm currently using this in my package.json for all those who need this fix

"@react-native-masked-view/masked-view": "https://github.com/react-native-masked-view/masked-view/archive/edee2e76a3ead5135d8328ec5c5073415e4c9dbe.tar.gz",

@samueljim
Copy link

BUMP

Copy link

@AliRezaBeigy AliRezaBeigy left a comment

Choose a reason for hiding this comment

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

as @samueljim tested it's ok
i test it too and the black background issue goes away
@Naturalclar can you merge these change?

Copy link
Contributor

@Naturalclar Naturalclar left a comment

Choose a reason for hiding this comment

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

thank you so much!

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.

Android broken background with react-native 0.75.1
5 participants