Assigned
Status Update
Comments
ma...@google.com <ma...@google.com>
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 47fa86ca5165deb3e298bdd8eddd485322a2a043
Author: malkov <malkov@google.com>
Date: Mon Sep 04 18:21:33 2023
Mark some foundation functions and modifiers as @Stable
Relnote: more modifiers marked as stable
Bug: 298046462
Test: updateApi, pure api change
Change-Id: I56af1d5a1f7e93a0e228a57e6631957ff94f82a3
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Background.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/BasicMarquee.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/BasicTooltip.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Border.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/ClipScrollableContainer.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/SelectableGroup.kt
https://android-review.googlesource.com/2738797
Branch: androidx-main
commit 47fa86ca5165deb3e298bdd8eddd485322a2a043
Author: malkov <malkov@google.com>
Date: Mon Sep 04 18:21:33 2023
Mark some foundation functions and modifiers as @Stable
Relnote: more modifiers marked as stable
Bug: 298046462
Test: updateApi, pure api change
Change-Id: I56af1d5a1f7e93a0e228a57e6631957ff94f82a3
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Background.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/BasicMarquee.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/BasicTooltip.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Border.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/ClipScrollableContainer.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/Focusable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Scrollable.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/selection/SelectableGroup.kt
ma...@google.com <ma...@google.com> #3
The only ones left are bring into view and focus related, but they do need some refactoring and modifier.node conversion before that.
Over to Ralston to handle that later.
Description
If the result of the factory function will compare equals with the result of a second invocation with the exact same parameters, then the function can be marked as @Stable. All of our modifier factories should meet this requirement (however there are some that don't still).
Marking them this way can reduce composition overhead in many common cases and is an easy win.
More context on this issue can be found in aosp/2729638