val composition by rememberLottieComposition(LottieCompositionSpec.Asset("myasset"))
LottieAnimation(
modifier = modifier,
composition = composition,
enableMergePaths = true,
)
In logcat I observe the warning Animation contains merge paths but they are disabled.
Looking at the stacktrace, shown below, this occurs because LottieDrawable.setComposition is invoked before LottieDrawable.enableMergePathsForKitKatAndAbove has been called in LottieAnimation (invoke:95, LottieAnimationKt$LottieAnimation$2 (com.airbnb.lottie.compose)).
From what I can tell this is inconsequential because enableMergePathsForKitKatAndAbove calls buildCompositionLayer, which eventually calls through to MergePaths again, but on the surface it would appear that enabling the merge path before setting the composition might eliminate the warning as well as an extra call to buildCompositionLayer.
Using com.airbnb.android:lottie-compose:4.2.2.
Client composable code:
In logcat I observe the warning
Animation contains merge paths but they are disabled.
Looking at the stacktrace, shown below, this occurs because
LottieDrawable.setComposition
is invoked beforeLottieDrawable.enableMergePathsForKitKatAndAbove
has been called inLottieAnimation
(invoke:95, LottieAnimationKt$LottieAnimation$2 (com.airbnb.lottie.compose)
).From what I can tell this is inconsequential because
enableMergePathsForKitKatAndAbove
callsbuildCompositionLayer
, which eventually calls through toMergePaths
again, but on the surface it would appear that enabling the merge path before setting the composition might eliminate the warning as well as an extra call tobuildCompositionLayer
.