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

Android hardware artifacting fix #38

Conversation

leezumstein
Copy link
Contributor

@leezumstein leezumstein commented Feb 20, 2021

Description

Making two tweaks to handle artifacting issues that are occurring on different Android devices.

Changes

  • Add { perspective: 100 } transform to the transform array (see documentation here).
  • Add new renderToHardwareTextureAndroid prop that defaults to true (see documentation here)
  • Update project readme to include documentation on new renderToHardwareTextureAndroid prop

Validation

Please Note: To verify the artifacting issue is resolved, you'll need an Android device such as a Pixel 4, a recent Samsung device, or any of the OnePlus devices.

  1. Unlink the project from npm if already done, so you can confirm the presence of artifacting before testing
    > npm unlink
  2. Install latest dependencies by running
    > yarn install
    > cd example && npm install
  3. Launch the application with the current implementation, confirming you see artifacting, by running
    > npm run android
  4. Copy over the latest project changes to the example project by running
    > npm run copy-files
  5. Confirm metro reloads the example project, then test the different animations and confirm there's no more artifacting issues on Android

Result

You should no longer have artifacting issues when running the application. Example before and after below on a OnePlus 7 Pro.

Before After
Before Video After Video

Related issues

@ghost
Copy link

ghost commented Feb 24, 2021

Thank you for this! We were having this exact problem.

@davidkircos
Copy link

Having the same problem. Will use this library once patched!

@magnusandy
Copy link

Awesome! @VincentCATILLON any update or timeline on when this will be released?

Copy link
Owner

@VincentCATILLON VincentCATILLON left a comment

Choose a reason for hiding this comment

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

Hey @leezumstein,

what a nice job, thanks for your (very nice) contribution 🚀
I got few questions and improvements suggestions

@@ -64,7 +69,7 @@ describe('index', () => {
expect(handleAnimationEnd).toHaveBeenCalledTimes(1);
});

it('should not start is autoStart is disabled', () => {
it('should not start if autoStart is disabled', () => {
Copy link
Owner

Choose a reason for hiding this comment

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

👍

src/index.d.ts Outdated Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
src/index.js Show resolved Hide resolved
src/index.js Outdated Show resolved Hide resolved
@leezumstein
Copy link
Contributor Author

@VincentCATILLON Thanks for taking the time to look at the PR, really appreciate all the feedback.

All of your comments should now be addressed; simplified a lot needed to correct the Android artifacting issues.

@VincentCATILLON
Copy link
Owner

@leezumstein

Thanks a lot, i really appreciate our communication on this PR.
Very nice job, all Android users will enjoy it now 🚀

@VincentCATILLON VincentCATILLON merged commit 2802713 into VincentCATILLON:master Mar 3, 2021
@VincentCATILLON
Copy link
Owner

@leezumstein Just added you as a contributor: 26e3f5a 🎉

@leezumstein leezumstein deleted the android-hardware-rendering-fix branch March 3, 2021 13:53
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.

None yet

4 participants