airbnb / lottie-android

Render After Effects animations natively on Android and iOS, Web, and React Native
http://airbnb.io/lottie/
Apache License 2.0
35.02k stars 5.41k forks source link

OpenGL Minimum version requirement for Lottie Animatino #2560

Closed CaulinJones closed 3 weeks ago

CaulinJones commented 3 weeks ago

Lottie is supported and developed on nights and weekends. Issues from Lottie sponsors will be prioritized.

If you don't use this template, your issue will be closed. Delete this text once completed.

Checklist

  1. My animation doesn't use any unsupported features.
  2. I know what part of my animation doesn't work.
  3. I have created a simplified version of my animation
  4. I have attached the AEP file (as a zip file so it can be attached) that only has the part of the animation that doesn't work.

Describe the bug A clear and concise description of what the bug is. I am working with a low powered embedded Android device and we noticed very high CPU levels when running animations, scaling with the number of lottie animations and complexity. This leads us to believe that lottie possible is rendering on the CPU vs the GPU via skia -> Open GL ES. Our device is running an old version of Android, v7.1.2, and we noticed that our device is running Open GL ES 2.0. I am wondering if Lottie has a minimum Open GL ES version requirement in order to utilize GPU rendering? I ask because we have other graphics libraries we are using that have the requirment for Open GL ES 3.0.

TYIA!

What version of Lottie did you test this on? 5.2.0 Android What version of Android did you test this on? Android 7.1.2_r32 Steps To Reproduce Steps to reproduce the behavior: Issue seems to be isolated to our specific Android version.

Screenshots

gpeal commented 3 weeks ago

If you are on 7.1, you manually need to turn on hardware acceleration (setRenderMode or the renderMode param for Compose)

This is the logic for the default "auto" mode.