Update Compose API docs (#2082)

diff --git a/.idea/inspectionProfiles/Project_Default.xml b/.idea/inspectionProfiles/Project_Default.xml
index cccd6bb..601ecd9 100644
--- a/.idea/inspectionProfiles/Project_Default.xml
+++ b/.idea/inspectionProfiles/Project_Default.xml
@@ -1,6 +1,7 @@
 <component name="InspectionProjectProfileManager">
   <profile version="1.0">
     <option name="myName" value="Project Default" />
+    <inspection_tool class="DeprecatedCallableAddReplaceWith" enabled="false" level="INFO" enabled_by_default="false" />
     <inspection_tool class="EqualsReplaceableByObjectsCall" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
     <inspection_tool class="ForCanBeForeach" enabled="false" level="WARNING" enabled_by_default="false">
       <option name="REPORT_INDEXED_LOOP" value="false" />
@@ -8,20 +9,34 @@
     </inspection_tool>
     <inspection_tool class="IfStatementWithIdenticalBranches" enabled="false" level="WEAK WARNING" enabled_by_default="false" />
     <inspection_tool class="PreviewAnnotationInFunctionWithParameters" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
       <option name="previewFile" value="true" />
     </inspection_tool>
     <inspection_tool class="PreviewDimensionRespectsLimit" enabled="true" level="WARNING" enabled_by_default="true">
+      <option name="composableFile" value="true" />
       <option name="previewFile" value="true" />
     </inspection_tool>
+    <inspection_tool class="PreviewFontScaleMustBeGreaterThanZero" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
+    </inspection_tool>
     <inspection_tool class="PreviewMultipleParameterProviders" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
       <option name="previewFile" value="true" />
     </inspection_tool>
     <inspection_tool class="PreviewMustBeTopLevelFunction" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
       <option name="previewFile" value="true" />
     </inspection_tool>
     <inspection_tool class="PreviewNeedsComposableAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
       <option name="previewFile" value="true" />
     </inspection_tool>
+    <inspection_tool class="PreviewNotSupportedInUnitTestFiles" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
+    </inspection_tool>
+    <inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
+      <option name="composableFile" value="true" />
+    </inspection_tool>
     <inspection_tool class="SameParameterValue" enabled="false" level="WARNING" enabled_by_default="false" />
     <inspection_tool class="SwitchStatementWithTooFewBranches" enabled="false" level="WARNING" enabled_by_default="false">
       <option name="m_limit" value="2" />
diff --git a/CHANGELOG.md b/CHANGELOG.md
index e24dfa2..6a44941 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,3 +1,7 @@
+# 5.2.0
+### Bugs Fixed
+* De-dupe gradient stops. On pre-Oreo devices, if you had color and opacity stops in the same place and used hardware acceleration, you may have seen artifacts at the stop positions as of 5.1.1 [#20814](https://github.com/airbnb/lottie-android/pull/2081)
+
 # 5.1.1
 ### New Features
 * Added support for gradient opacity stops at different points than color stops ([#2062](https://github.com/airbnb/lottie-android/pull/2062))
diff --git a/CHANGELOG_COMPOSE.md b/CHANGELOG_COMPOSE.md
index 98451df..22d5cdc 100644
--- a/CHANGELOG_COMPOSE.md
+++ b/CHANGELOG_COMPOSE.md
@@ -1,3 +1,26 @@
+# 5.2.0
+* [BREAKING CHANGE]
+LottieAnimation now takes progress as a `() -> Float` rather than a `Float`. This allows Lottie to redraw without triggering a recomposition every time progress updates. For more information, refer to the Compose [phase docs](https://developer.android.com/jetpack/compose/phases). The existing API will exist as deprecated for one more release but will then be removed. For the vast majority of use cases:
+
+```kotlin
+LottieAnimation(composition, progress)
+```
+will become:
+
+```kotlin
+LottieAnimation(composition, { progress })
+```
+
+or
+
+```kotlin
+LottieAnimation(
+  composition = composition,
+  progress = { progress }
+)
+```
+[#2078](https://github.com/airbnb/lottie-android/pull/2078).
+
 # 5.1.1
 * Add support for completable animations in tests ([#2051](https://github.com/airbnb/lottie-android/pull/2051))
 
diff --git a/build.gradle b/build.gradle
index a54430f..5bfee23 100644
--- a/build.gradle
+++ b/build.gradle
@@ -2,13 +2,13 @@
 
 buildscript {
   ext {
-    coroutinesVersion = '1.5.2'
+    coroutinesVersion = '1.6.2'
     coreVersion = '1.6.0'
     appcompatVersion = '1.3.1'
     activityVersion = '1.3.1'
     lifecycleVersion = '2.3.1'
-    composeVersion = '1.0.3'
-    kotlinVersion = '1.5.30'
+    composeVersion = '1.1.1'
+    kotlinVersion = '1.6.10'
     daggerVersion = '2.38.1'
     awsVersion = '2.8.3'
     mockitoVersion = '3.12.4'
diff --git a/issue-repro-compose/src/main/java/com/airbnb/lottie/issues/compose/ComposeIssueReproActivity.kt b/issue-repro-compose/src/main/java/com/airbnb/lottie/issues/compose/ComposeIssueReproActivity.kt
index aeecf2f..abf6dc2 100755
--- a/issue-repro-compose/src/main/java/com/airbnb/lottie/issues/compose/ComposeIssueReproActivity.kt
+++ b/issue-repro-compose/src/main/java/com/airbnb/lottie/issues/compose/ComposeIssueReproActivity.kt
@@ -7,6 +7,7 @@
 import androidx.compose.runtime.getValue
 import com.airbnb.lottie.compose.LottieAnimation
 import com.airbnb.lottie.compose.LottieCompositionSpec
+import com.airbnb.lottie.compose.LottieConstants
 import com.airbnb.lottie.compose.animateLottieCompositionAsState
 import com.airbnb.lottie.compose.rememberLottieComposition
 
@@ -21,7 +22,7 @@
     @Composable
     fun Content() {
         val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.heart))
-        val progress by animateLottieCompositionAsState(composition)
+        val progress by animateLottieCompositionAsState(composition, iterations = LottieConstants.IterateForever)
         LottieAnimation(composition, { progress })
     }
 }
diff --git a/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt b/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
index 0101abd..fb9edec 100644
--- a/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
+++ b/lottie-compose/src/main/java/com/airbnb/lottie/compose/LottieAnimation.kt
@@ -32,7 +32,7 @@
  *
  * @param composition The composition that will be rendered. To generate a [LottieComposition], you can use
  *                    [rememberLottieComposition].
- * @param progressProvider A provider for the progress (between 0 and 1) that should be rendered. If you want to render a
+ * @param progress A provider for the progress (between 0 and 1) that should be rendered. If you want to render a
  *                         specific frame, you can use [LottieComposition.getFrameForProgress]. In most cases, you will want
  *                         to use one of the overloaded LottieAnimation composables that drives the animation for you.
  *                         The overloads that have isPlaying as a parameter instead of progress will drive the
@@ -69,7 +69,7 @@
 @Composable
 fun LottieAnimation(
     composition: LottieComposition?,
-    progressProvider: () -> Float,
+    progress: () -> Float,
     modifier: Modifier = Modifier,
     outlineMasksAndMattes: Boolean = false,
     applyOpacityToLayers: Boolean = false,
@@ -114,7 +114,7 @@
             drawable.isApplyingOpacityToLayersEnabled = applyOpacityToLayers
             drawable.maintainOriginalImageBounds = maintainOriginalImageBounds
             drawable.clipToCompositionBounds = clipToCompositionBounds
-            drawable.progress = progressProvider()
+            drawable.progress = progress()
             drawable.setBounds(0, 0, composition.bounds.width(), composition.bounds.height())
             drawable.draw(canvas.nativeCanvas, matrix)
         }
@@ -127,6 +127,7 @@
  * @see LottieAnimation
  */
 @Composable
+@Deprecated("Pass progress as a lambda instead of a float. This overload will be removed in the next release.")
 fun LottieAnimation(
     composition: LottieComposition?,
     @FloatRange(from = 0.0, to = 1.0) progress: Float,
@@ -192,18 +193,18 @@
         iterations,
     )
     LottieAnimation(
-        composition,
-        { progress },
-        modifier,
-        outlineMasksAndMattes,
-        applyOpacityToLayers,
-        enableMergePaths,
-        renderMode,
-        maintainOriginalImageBounds,
-        dynamicProperties,
-        alignment,
-        contentScale,
-        clipToCompositionBounds,
+        composition = composition,
+        progress = { progress },
+        modifier = modifier,
+        outlineMasksAndMattes = outlineMasksAndMattes,
+        applyOpacityToLayers = applyOpacityToLayers,
+        enableMergePaths = enableMergePaths,
+        renderMode = renderMode,
+        maintainOriginalImageBounds = maintainOriginalImageBounds,
+        dynamicProperties = dynamicProperties,
+        alignment = alignment,
+        contentScale = contentScale,
+        clipToCompositionBounds = clipToCompositionBounds,
     )
 }
 
diff --git a/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/InfiniteAnimationTest.kt b/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/InfiniteAnimationTest.kt
index 624c122..1ebb7c6 100644
--- a/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/InfiniteAnimationTest.kt
+++ b/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/InfiniteAnimationTest.kt
@@ -36,7 +36,7 @@
             ) {
                 LottieAnimation(
                     composition,
-                    progress,
+                    { progress },
                 )
                 Text(
                     "Composition Loaded!",
diff --git a/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/WalkthroughAnimationTest.kt b/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/WalkthroughAnimationTest.kt
index ec62397..6bdb3f5 100644
--- a/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/WalkthroughAnimationTest.kt
+++ b/sample-compose/src/androidTest/java/com/airbnb/lottie/samples/WalkthroughAnimationTest.kt
@@ -32,7 +32,7 @@
             ) {
                 LottieAnimation(
                     composition,
-                    progress,
+                    { progress },
                 )
             }
 
diff --git a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/BasicUsageExamplesPage.kt b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/BasicUsageExamplesPage.kt
index f82e2ba..7febf7d 100644
--- a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/BasicUsageExamplesPage.kt
+++ b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/BasicUsageExamplesPage.kt
@@ -124,7 +124,7 @@
     val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.heart))
     LottieAnimation(
         composition,
-        progress = 0.65f,
+        progress = { 0.65f },
     )
 }
 
diff --git a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/ContentScaleExamplesPage.kt b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/ContentScaleExamplesPage.kt
index f12438c..8599a6d 100644
--- a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/ContentScaleExamplesPage.kt
+++ b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/ContentScaleExamplesPage.kt
@@ -61,7 +61,7 @@
             ) {
                 LottieAnimation(
                     composition,
-                    progress = 0f,
+                    progress = { 0f },
                     alignment = alignment,
                     contentScale = contentScale,
                 )
diff --git a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/TextExamplesPage.kt b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/TextExamplesPage.kt
index 6c17fb3..0bab4ea 100644
--- a/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/TextExamplesPage.kt
+++ b/sample-compose/src/main/java/com/airbnb/lottie/sample/compose/examples/TextExamplesPage.kt
@@ -51,7 +51,7 @@
     val composition by rememberLottieComposition(LottieCompositionSpec.RawRes(R.raw.name))
     LottieAnimation(
         composition,
-        progress = 0f,
+        progress = { 0f },
     )
 }
 
@@ -65,7 +65,7 @@
 
     LottieAnimation(
         composition,
-        progress = 0f,
+        progress = { 0f },
         dynamicProperties = dynamicProperties,
     )
 }
diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/SnapshotTestCaseContext.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/SnapshotTestCaseContext.kt
index 35dc7e5..bd8ed08 100644
--- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/SnapshotTestCaseContext.kt
+++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/SnapshotTestCaseContext.kt
@@ -13,7 +13,10 @@
 import android.widget.LinearLayout
 import androidx.compose.runtime.Composable
 import androidx.compose.runtime.CompositionLocalProvider
+import androidx.compose.runtime.LaunchedEffect
+import androidx.compose.runtime.collectAsState
 import androidx.compose.runtime.compositionLocalOf
+import androidx.compose.runtime.getValue
 import androidx.compose.ui.platform.ComposeView
 import com.airbnb.lottie.FontAssetDelegate
 import com.airbnb.lottie.LottieAnimationView
@@ -189,7 +192,12 @@
         CompositionLocalProvider(LocalSnapshotReady provides readyFlow) {
             content(RenderMode.SOFTWARE)
         }
-        if (readyFlow.value == null) readyFlow.value = true
+        val readyFlowValue by readyFlow.collectAsState()
+        LaunchedEffect(readyFlowValue) {
+            if (readyFlowValue == null) {
+                readyFlow.value = true
+            }
+        }
     }
     onActivity { activity ->
         activity.binding.content.addView(composeView)
@@ -211,7 +219,12 @@
             CompositionLocalProvider(LocalSnapshotReady provides readyFlow) {
                 content(RenderMode.HARDWARE)
             }
-            if (readyFlow.value == null) readyFlow.value = true
+            val readyFlowValue by readyFlow.collectAsState()
+            LaunchedEffect(readyFlowValue) {
+                if (readyFlowValue == null) {
+                    readyFlow.value = true
+                }
+            }
         }
         readyFlow.first { it == true }
         composeView.awaitFrame()
diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ClipChildrenTestCase.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ClipChildrenTestCase.kt
index f2408e8..f8cb06c 100644
--- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ClipChildrenTestCase.kt
+++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ClipChildrenTestCase.kt
@@ -27,7 +27,7 @@
             ) {
                 LottieAnimation(
                     composition,
-                    0.7f,
+                    { 0.7f },
                     contentScale = ContentScale.Crop,
                     renderMode = renderMode,
                     modifier = Modifier
@@ -44,7 +44,7 @@
             ) {
                 LottieAnimation(
                     composition,
-                    0.7f,
+                    { 0.7f },
                     contentScale = ContentScale.Crop,
                     renderMode = renderMode,
                     clipToCompositionBounds = false,
diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeDynamicPropertiesTestCase.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeDynamicPropertiesTestCase.kt
index a4b9be7..00bc92d 100644
--- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeDynamicPropertiesTestCase.kt
+++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeDynamicPropertiesTestCase.kt
@@ -3,6 +3,7 @@
 import android.graphics.Bitmap
 import android.graphics.BitmapFactory
 import android.graphics.Color
+import androidx.compose.runtime.LaunchedEffect
 import androidx.compose.runtime.getValue
 import com.airbnb.lottie.LottieCompositionFactory
 import com.airbnb.lottie.LottieProperty
@@ -36,45 +37,48 @@
                     "Gradient Fill"
                 )
             )
-            LottieAnimation(composition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)
         }
 
         val heartComposition = LottieCompositionFactory.fromAssetSync(context, "Tests/Heart.json").value!!
         snapshotComposable("Compose Dynamic Image", "Default") {
             val composition by rememberLottieComposition(LottieCompositionSpec.Asset("Tests/Heart.json"))
-            LocalSnapshotReady.current.value = composition != null
-            LottieAnimation(composition, 0f)
+            val snapshotReady = LocalSnapshotReady.current
+            LaunchedEffect(snapshotReady, composition != null) {
+                snapshotReady.value = composition != null
+            }
+            LottieAnimation(composition, { 0f })
         }
         snapshotComposable("Compose Dynamic Image", "Default - Maintain Original Bounds") {
-            LottieAnimation(heartComposition, 0f, maintainOriginalImageBounds = true)
+            LottieAnimation(heartComposition, { 0f }, maintainOriginalImageBounds = true)
         }
         snapshotComposable("Compose Dynamic Image", "Smaller") {
             val bitmap = getBitmapFromAssets("Images/Heart-80.png")
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.IMAGE, bitmap, "Heart"),
             )
-            LottieAnimation(heartComposition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(heartComposition, { 0f }, dynamicProperties = dynamicProperties)
         }
         snapshotComposable("Compose Dynamic Image", "Smaller - Maintain Original Bounds") {
             val bitmap = getBitmapFromAssets("Images/Heart-80.png")
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.IMAGE, bitmap, "Heart"),
             )
-            LottieAnimation(heartComposition, 0f, dynamicProperties = dynamicProperties, maintainOriginalImageBounds = true)
+            LottieAnimation(heartComposition, { 0f }, dynamicProperties = dynamicProperties, maintainOriginalImageBounds = true)
         }
         snapshotComposable("Compose Dynamic Image", "Larger") {
             val bitmap = getBitmapFromAssets("Images/Heart-1200.png")
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.IMAGE, bitmap, "Heart"),
             )
-            LottieAnimation(heartComposition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(heartComposition, { 0f }, dynamicProperties = dynamicProperties)
         }
         snapshotComposable("Compose Dynamic Image", "Larger - Maintain Original Bounds") {
             val bitmap = getBitmapFromAssets("Images/Heart-1200.png")
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.IMAGE, bitmap, "Heart"),
             )
-            LottieAnimation(heartComposition, 0f, dynamicProperties = dynamicProperties, maintainOriginalImageBounds = true)
+            LottieAnimation(heartComposition, { 0f }, dynamicProperties = dynamicProperties, maintainOriginalImageBounds = true)
         }
     }
 
diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeScaleTypesTestCase.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeScaleTypesTestCase.kt
index fa99b35..54f993d 100644
--- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeScaleTypesTestCase.kt
+++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/ComposeScaleTypesTestCase.kt
@@ -17,7 +17,7 @@
         snapshotComposable("Compose Scale Types", "Wrap Content", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 renderMode = renderMode,
             )
         }
@@ -25,7 +25,7 @@
         snapshotComposable("Compose Scale Types", "720p", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 renderMode = renderMode,
                 modifier = Modifier
                     .size(720.dp, 1280.dp)
@@ -35,7 +35,7 @@
         snapshotComposable("Compose Scale Types", "300x300@2x", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 renderMode = renderMode,
                 modifier = Modifier
                     .size(300.dp, 300.dp)
@@ -46,7 +46,7 @@
         snapshotComposable("Compose Scale Types", "300x300@4x", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 renderMode = renderMode,
                 modifier = Modifier
                     .size(300.dp, 300.dp)
@@ -57,7 +57,7 @@
         snapshotComposable("Compose Scale Types", "300x300 Crop", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.Crop,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -68,7 +68,7 @@
         snapshotComposable("Compose Scale Types", "300x300 Inside", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.Inside,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -79,7 +79,7 @@
         snapshotComposable("Compose Scale Types", "300x300 FillBounds", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.FillBounds,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -90,7 +90,7 @@
         snapshotComposable("Compose Scale Types", "300x300 Fit 2x", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.Fit,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -102,7 +102,7 @@
         snapshotComposable("Compose Scale Types", "300x300 Crop 2x", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.Crop,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -114,7 +114,7 @@
         snapshotComposable("Compose Scale Types", "600x600 Inside", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.Inside,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -125,7 +125,7 @@
         snapshotComposable("Compose Scale Types", "600x600 FillBounds", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.FillBounds,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -136,7 +136,7 @@
         snapshotComposable("Compose Scale Types", "600x600 Fit", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.Fit,
                 renderMode = renderMode,
                 modifier = Modifier
@@ -147,7 +147,7 @@
         snapshotComposable("Compose Scale Types", "300x600 FitBounds", renderHardwareAndSoftware = true) { renderMode ->
             LottieAnimation(
                 composition,
-                1f,
+                { 1f },
                 contentScale = ContentScale.FillBounds,
                 renderMode = renderMode,
                 modifier = Modifier
diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/LargeCompositionSoftwareRendering.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/LargeCompositionSoftwareRendering.kt
index ae4fb16..ddcbc4a 100644
--- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/LargeCompositionSoftwareRendering.kt
+++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/LargeCompositionSoftwareRendering.kt
@@ -6,7 +6,6 @@
 import androidx.compose.foundation.layout.Box
 import androidx.compose.foundation.layout.size
 import androidx.compose.runtime.Composable
-import androidx.compose.runtime.getValue
 import androidx.compose.ui.Modifier
 import androidx.compose.ui.graphics.Color
 import androidx.compose.ui.layout.ContentScale
@@ -15,8 +14,6 @@
 import com.airbnb.lottie.LottieComposition
 import com.airbnb.lottie.LottieCompositionFactory
 import com.airbnb.lottie.compose.LottieAnimation
-import com.airbnb.lottie.compose.LottieCompositionSpec
-import com.airbnb.lottie.compose.rememberLottieComposition
 import com.airbnb.lottie.snapshots.SnapshotTestCase
 import com.airbnb.lottie.snapshots.SnapshotTestCaseContext
 import com.airbnb.lottie.snapshots.snapshotComposable
@@ -55,25 +52,25 @@
         }
 
         snapshotWithComposable("Fit") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.Fit)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.Fit)
         }
         snapshotWithComposable("Crop") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.Crop)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.Crop)
         }
         snapshotWithComposable("FillBounds") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.FillBounds)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.FillBounds)
         }
         snapshotWithComposable("FillWidth") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.FillWidth)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.FillWidth)
         }
         snapshotWithComposable("FillHeight") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.FillHeight)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.FillHeight)
         }
         snapshotWithComposable("Inside") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.Inside)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.Inside)
         }
         snapshotWithComposable("None") { comp ->
-            LottieAnimation(comp, progress = 0f, contentScale = ContentScale.None)
+            LottieAnimation(comp, progress = { 0f }, contentScale = ContentScale.None)
         }
     }
 
diff --git a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt
index 601c0ac..ebb7ea8 100644
--- a/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt
+++ b/snapshot-tests/src/androidTest/java/com/airbnb/lottie/snapshots/tests/TextTestCase.kt
@@ -1,7 +1,7 @@
 package com.airbnb.lottie.snapshots.tests
 
+import androidx.compose.runtime.LaunchedEffect
 import androidx.compose.runtime.getValue
-import com.airbnb.lottie.LottieCompositionFactory
 import com.airbnb.lottie.LottieProperty
 import com.airbnb.lottie.TextDelegate
 import com.airbnb.lottie.compose.LottieAnimation
@@ -12,7 +12,6 @@
 import com.airbnb.lottie.snapshots.LocalSnapshotReady
 import com.airbnb.lottie.snapshots.SnapshotTestCase
 import com.airbnb.lottie.snapshots.SnapshotTestCaseContext
-import com.airbnb.lottie.snapshots.loadCompositionFromAssetsSync
 import com.airbnb.lottie.snapshots.snapshotComposable
 import com.airbnb.lottie.snapshots.withAnimationView
 
@@ -140,53 +139,68 @@
 
         snapshotComposable("Compose Dynamic Text", "Emoji") {
             val composition by rememberLottieComposition(LottieCompositionSpec.Asset("Tests/DynamicText.json"))
-            LocalSnapshotReady.current.value = composition != null
+            val snapshotReady = LocalSnapshotReady.current
+            LaunchedEffect(snapshotReady, composition != null) {
+                snapshotReady.value = composition != null
+            }
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.TEXT, "NAME") {
                     "🔥💪💯"
                 },
             )
-            LottieAnimation(composition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)
         }
 
         snapshotComposable("Compose Dynamic Text", "Taiwanese") {
             val composition by rememberLottieComposition(LottieCompositionSpec.Asset("Tests/DynamicText.json"))
-            LocalSnapshotReady.current.value = composition != null
+            val snapshotReady = LocalSnapshotReady.current
+            LaunchedEffect(snapshotReady, composition != null) {
+                snapshotReady.value = composition != null
+            }
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.TEXT, "我的密碼", "NAME"),
             )
-            LottieAnimation(composition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)
         }
 
         snapshotComposable("Compose Dynamic Text", "Hindi") {
             val composition by rememberLottieComposition(LottieCompositionSpec.Asset("Tests/DynamicText.json"))
-            LocalSnapshotReady.current.value = composition != null
+            val snapshotReady = LocalSnapshotReady.current
+            LaunchedEffect(snapshotReady, composition != null) {
+                snapshotReady.value = composition != null
+            }
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.TEXT, "आपका लेख", "NAME"),
             )
-            LottieAnimation(composition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)
         }
 
         snapshotComposable("Compose Dynamic Text", "FrameInfo.startValue") {
             val composition by rememberLottieComposition(LottieCompositionSpec.Asset("Tests/DynamicText.json"))
-            LocalSnapshotReady.current.value = composition != null
+            val snapshotReady = LocalSnapshotReady.current
+            LaunchedEffect(snapshotReady, composition != null) {
+                snapshotReady.value = composition != null
+            }
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.TEXT, "NAME") { frameInfo ->
                     "${frameInfo.startValue}!!!"
                 },
             )
-            LottieAnimation(composition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)
         }
 
         snapshotComposable("Compose Dynamic Text", "FrameInfo.endValue") {
             val composition by rememberLottieComposition(LottieCompositionSpec.Asset("Tests/DynamicText.json"))
-            LocalSnapshotReady.current.value = composition != null
+            val snapshotReady = LocalSnapshotReady.current
+            LaunchedEffect(snapshotReady, composition != null) {
+                snapshotReady.value = composition != null
+            }
             val dynamicProperties = rememberLottieDynamicProperties(
                 rememberLottieDynamicProperty(LottieProperty.TEXT, "NAME") { frameInfo ->
                     "${frameInfo.endValue}!!!"
                 },
             )
-            LottieAnimation(composition, 0f, dynamicProperties = dynamicProperties)
+            LottieAnimation(composition, { 0f }, dynamicProperties = dynamicProperties)
         }
     }
 }
\ No newline at end of file