Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
th...@gmail.com <th...@gmail.com> #2
Hi Ed, Thank you so much for these suggestions. I've been reviewing them and merging them in. Hopefully it should be live. I've included a thank you note too in the article.
an...@google.com <an...@google.com> #3
Great! Thanks a lot, I'll look for the live updates soon!
ch...@google.com <ch...@google.com> #4
The issue is that the invalidated compositions are calculated in the Recompose as a single step. If a composition modifies a value that requires another composition that was not previously invalidated to become invalid we don't add it to the list of compositions to be composed in this frame, but leave it to the next frame.
Discussing with Adam about the best way to fix this.
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit de27354b08213ee30616d35b2f894527125cd28a
Author: Chuck Jazdzewski <chuckj@google.com>
Date: Wed May 12 10:37:30 2021
Recompose late arriving changes immediately
If a composition changes a value observed by another composition
then the propagation of the change can be delayed by a frame. This
can cause noticible flicker as seen in b/184173932 .
This change recomposes affected compositions immediately instead.
Relnote: """ControlledComposition API change to enable recomposing
changes in a recompose single pass."""
Fixes: b/184173932
Test: ./gradlew :compose:r:r:tDUT
Change-Id: Iaafd1d5f11e2ee2b499745b9f111f7442563a4ce
M compose/runtime/runtime/api/1.0.0-beta08.txt
M compose/runtime/runtime/api/current.ignore
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/public_plus_experimental_1.0.0-beta08.txt
M compose/runtime/runtime/api/public_plus_experimental_current.txt
M compose/runtime/runtime/api/restricted_1.0.0-beta08.txt
M compose/runtime/runtime/api/restricted_current.ignore
M compose/runtime/runtime/api/restricted_current.txt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Recomposer.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/IdentityArraySet.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/IdentityScopeMap.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/CompositionTests.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/IdentityArraySetTest.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/IdentityScopeMapTest.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/mock/CompositionTest.kt
https://android-review.googlesource.com/1705446
Branch: androidx-main
commit de27354b08213ee30616d35b2f894527125cd28a
Author: Chuck Jazdzewski <chuckj@google.com>
Date: Wed May 12 10:37:30 2021
Recompose late arriving changes immediately
If a composition changes a value observed by another composition
then the propagation of the change can be delayed by a frame. This
can cause noticible flicker as seen in
This change recomposes affected compositions immediately instead.
Relnote: """ControlledComposition API change to enable recomposing
changes in a recompose single pass."""
Fixes:
Test: ./gradlew :compose:r:r:tDUT
Change-Id: Iaafd1d5f11e2ee2b499745b9f111f7442563a4ce
M compose/runtime/runtime/api/1.0.0-beta08.txt
M compose/runtime/runtime/api/current.ignore
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/public_plus_experimental_1.0.0-beta08.txt
M compose/runtime/runtime/api/public_plus_experimental_current.txt
M compose/runtime/runtime/api/restricted_1.0.0-beta08.txt
M compose/runtime/runtime/api/restricted_current.ignore
M compose/runtime/runtime/api/restricted_current.txt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composer.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Composition.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/Recomposer.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/IdentityArraySet.kt
M compose/runtime/runtime/src/commonMain/kotlin/androidx/compose/runtime/collection/IdentityScopeMap.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/CompositionTests.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/IdentityArraySetTest.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/collection/IdentityScopeMapTest.kt
M compose/runtime/runtime/src/test/kotlin/androidx/compose/runtime/mock/CompositionTest.kt
Description
Jetpack Compose release version:
Description: The content inside a
BoxWithConstraints
will not be updated immediately when changing the Theme between light and dark.Steps to Reproduce: