Bug P2
Status Update
Comments
ch...@gmail.com <ch...@gmail.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit 2e60aef4d56a64a8d8732c543b644ff0b4b78734
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Dec 19 13:45:45 2022
Flesh out MultiParagraphPlaceholderLayoutCache
It's now a layout cache.
TextInlineContentLayoutDrawModifier now does similar debouncing
on input, and defers all cache behaviors to the cache.
Bug: b/246960758
Test: ./gradlew :com:found:found-d-n-s-newtext:cAT
Change-Id: If104398da705747c6cdcaffe95ff9d2badd20324
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheTest.kt
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheWidthWithLetterSpacingTest.kt
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextLayoutResultIntegrationTest.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
D compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/InlineContentLayoutDrawModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawParams.kt
M compose/foundation/foundation-newtext/src/test/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheTest.kt
https://android-review.googlesource.com/2362353
Branch: androidx-main
commit 2e60aef4d56a64a8d8732c543b644ff0b4b78734
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Dec 19 13:45:45 2022
Flesh out MultiParagraphPlaceholderLayoutCache
It's now a layout cache.
TextInlineContentLayoutDrawModifier now does similar debouncing
on input, and defers all cache behaviors to the cache.
Bug:
Test: ./gradlew :com:found:found-d-n-s-newtext:cAT
Change-Id: If104398da705747c6cdcaffe95ff9d2badd20324
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheTest.kt
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheWidthWithLetterSpacingTest.kt
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextLayoutResultIntegrationTest.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
D compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/InlineContentLayoutDrawModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawParams.kt
M compose/foundation/foundation-newtext/src/test/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheTest.kt
ae...@google.com <ae...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit 968e10f6319d6e22d035191fa863e5b41c5ce957
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Dec 19 14:20:48 2022
Add semantics to static text modifier
Draws static text and adds appropriate semantics for non-editable text
This adds semantics to text modifier rewrite.
Bug: b/246960758
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: I05c30a3ba21b4b409f15b15e06c271b2d759de0a
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/TextLayoutTest.kt
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/BasicTextSemanticsTest.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
https://android-review.googlesource.com/2363663
Branch: androidx-main
commit 968e10f6319d6e22d035191fa863e5b41c5ce957
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Dec 19 14:20:48 2022
Add semantics to static text modifier
Draws static text and adds appropriate semantics for non-editable text
This adds semantics to text modifier rewrite.
Bug:
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: I05c30a3ba21b4b409f15b15e06c271b2d759de0a
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/TextLayoutTest.kt
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/modifiers/BasicTextSemanticsTest.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
ch...@gmail.com <ch...@gmail.com> #4
Project: platform/frameworks/support
Branch: androidx-main
commit 56d766d1f2e2735425cf9cd20ed802c203223f56
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Dec 20 11:25:08 2022
Code cleanup for text modifiers
- Semantics allocation caching
- various logic cleanup
- cache added more invalidation branches
Bug: b/246960758
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: Ice59bdee908cedb2ad7a5756a1c5810de3823bb2
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
https://android-review.googlesource.com/2361967
Branch: androidx-main
commit 56d766d1f2e2735425cf9cd20ed802c203223f56
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Dec 20 11:25:08 2022
Code cleanup for text modifiers
- Semantics allocation caching
- various logic cleanup
- cache added more invalidation branches
Bug:
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: Ice59bdee908cedb2ad7a5756a1c5810de3823bb2
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 48a03c8e31e7ae37924b173b7396f1087740024b
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Dec 20 14:04:38 2022
Port heightInLines behavior to new modifier
Adds support for minLines/maxLines to TextUsingModifier
Bug: b/246960758
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: Ic2823ce15f10cafb180aca46e80f62d6b6abd9e0
A compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifierMinMaxLinesTest.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MinMaxLinesUtils.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawParams.kt
https://android-review.googlesource.com/2361789
Branch: androidx-main
commit 48a03c8e31e7ae37924b173b7396f1087740024b
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Dec 20 14:04:38 2022
Port heightInLines behavior to new modifier
Adds support for minLines/maxLines to TextUsingModifier
Bug:
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: Ic2823ce15f10cafb180aca46e80f62d6b6abd9e0
A compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifierMinMaxLinesTest.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MinMaxLinesUtils.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawParams.kt
ma...@gmail.com <ma...@gmail.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit 05bdcc6bc778f2ccd4a9378ede04bd99c26372f1
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Jan 09 16:36:03 2023
Remove 6 more allocations from TextUsingModifier measure
// before
1,220,605 ns 306 allocs trace ModifierAllAppsSetText.measureIt[size=8]
// after
1,176,671 ns 300 allocs trace ModifierAllAppsSetText.measureIt[size=8]
Test: bench
Bug: b/246960758
Change-Id: I98e2a5ba2657d634bbcc87be4cba5c3a0f24a53a
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
https://android-review.googlesource.com/2380665
Branch: androidx-main
commit 05bdcc6bc778f2ccd4a9378ede04bd99c26372f1
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Jan 09 16:36:03 2023
Remove 6 more allocations from TextUsingModifier measure
// before
1,220,605 ns 306 allocs trace ModifierAllAppsSetText.measureIt[size=8]
// after
1,176,671 ns 300 allocs trace ModifierAllAppsSetText.measureIt[size=8]
Test: bench
Bug:
Change-Id: I98e2a5ba2657d634bbcc87be4cba5c3a0f24a53a
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
Description
I'm currently writing a custom
FlingBehavior
which handles flings from the Lazy layouts. Unfortunately I'm seeing weirdness in the velocity values provided.It seems that if you perform a number of flings in alternating directions (left then right, repeat), the velocities accumulate.
I had a quick look through draggable, and I'm not seeing anywhere where the VelocityTracker is being reset. I'd expect a call tohttps://cs.android.com/androidx/platform/frameworks/support/+/androidx-main:compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/gestures/Draggable.kt;l=329
velocityTracker.resetTracking()
somewhere around here:Is this intentional?