commit | 1f9ebfceb8f212b4e67fbe128ccf2562a85ff852 | [log] [tgz] |
---|---|---|
author | Gabriel Peal <gpeal@users.noreply.github.com> | Tue Dec 11 22:02:34 2018 -0800 |
committer | GitHub <noreply@github.com> | Tue Dec 11 22:02:34 2018 -0800 |
tree | 13f4768df6cfa1151e0a32b51c1b5959853153d2 | |
parent | 366206a3113c8639e971f7332141faac8dca2d9a [diff] |
Use the correct bounds for saveLayer calls (#1023) f027871b112a63502ffabb446331bcae411ec6aa was supposed to dramatically improve the performance of masks and mattes by only saving the intersection bounds of content with their masks mattes. However, one additional line of code was left in and undid all of that work: https://github.com/airbnb/lottie-android/commit/f027871b112a63502ffabb446331bcae411ec6aa#diff-1dfdb6e89340ceb7e433b6e150edb39bR171 Removing that line wasn't sufficient though. There were a few bugs in getBounds() that were caught and resolved thanks to the Happo tests in this PR. Animations with masks and mattes should perform 2-10x better after this change.
Lottie is a mobile library for Android and iOS that parses Adobe After Effects animations exported as json with Bodymovin and renders them natively on mobile!
For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand. They say a picture is worth 1,000 words so here are 13,000:
Gradle is the only supported build configuration, so just add the dependency to your project build.gradle
file:
dependencies { implementation 'com.airbnb.android:lottie:$lottieVersion' }
The latest Lottie version is:
Lottie 2.8.0 and above only supports projects that have been migrated to androidx for more information, read Google's migration guide.