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

Allow Android rendering mode (hardware/software) to be controlled via a prop #127

Conversation

levibuzolic
Copy link
Contributor

#116 improved performance, but disabled the ability to animate the mask on Android. This PR introduces a new property androidRenderingMode which allows the user to choose the rendering mode should they require the ability to animate the mask element and are willing to accept the performance trade-off.

Ideally a way to animate the mask while keeping performance good can be found, but until then this seems like a reasonable compromise.

Fixes #117

… a prop

By default hardware rendering mode will be used, however if you want to animate your mask you'll need to opt into software rendering.
@FonDorn
Copy link
Collaborator

FonDorn commented Jul 13, 2021

@Naturalclar what do you think? Can we go ahead and merge this changes?

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.

Sounds good to me 👍

@Naturalclar Naturalclar merged commit c989d68 into react-native-masked-view:master Jul 14, 2021
@hannojg
Copy link

hannojg commented Aug 31, 2021

@levibuzolic Thanks for this PR! I used this PR, set the androidRenderingMode to software and I am still not able to animate the mask element (changes are not being updated) Any ideas on this?

@levibuzolic
Copy link
Contributor Author

levibuzolic commented Sep 1, 2021

@hannojg after shipping this change in our app, we've found that some devices don't support it or are forcing hardware rendering mode. This appears to be very common on Huawei devices, but we've also seen reports from a few others. At this stage we haven't been able to find a solution for this.

@levibuzolic levibuzolic deleted the android-optional-hardware-rendering branch September 1, 2021 00:22
@seasheepjoe
Copy link

seasheepjoe commented Dec 8, 2022

@hannojg @levibuzolic I had the same issue but setting the androidRenderingMode prop to 'software' works for me on 0.2.8.

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.

Animated masked view no longer works on android <= 9
5 participants