Status Update
Comments
ap...@google.com <ap...@google.com> #2
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
tc...@google.com <tc...@google.com>
ti...@google.com <ti...@google.com> #3
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
lp...@google.com <lp...@google.com> #4
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
ti...@google.com <ti...@google.com> #5
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
lp...@google.com <lp...@google.com> #6
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
ti...@google.com <ti...@google.com> #7
Branch: androidx-main
commit 596ad9439f540ba37416b492e991dfc90b5177b3
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Jan 09 15:03:13 2023
Fix restart behavior in TextUsingModifier
Use new restarting methods correctly
Bug:
Test: Manual - integrated with Sample app
Change-Id: I0cf75a543927280fcc1efb5b0460c50f3bc37088
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
lp...@google.com <lp...@google.com> #8
Branch: androidx-main
commit b930c4eaebb6b0405197e31122c2b5cc3ac2cc38
Author: Sean McQuillan <seanmcq@google.com>
Date: Fri Jan 06 13:31:11 2023
Remove excess allocs from TextUsingModifier
- AnnotatedString overload is no-alloc for no-inline content
- Both overloads use cheaper Layout call when possible
- Cache MeasurePolicy to avoid realloc
- Merge both modifiers into StaticTextModifier
- Make semantics allocation lazy
- Cache FirstBaseline and LastBaseline calcs & map
- Don't box MultParagraphLayoutCache Pair<Int, Int>
- Don't box MinMaxLinesCoercer<Float, Float> (use NaN as sentinal instead)
Add new AnnotatedString.hasStringAnnotations zero-alloc query method
Relnote: "Add AnnotatedString.hasStringAnnotations to query for annotations with zero-allocations."
Bug:
Test: ./gradlew :com:ui:ui-text:test
Change-Id: I94dfec1e10e72e2fdc2eb482c74f8c058095b348
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/AnnotatedStringResolveInlineContent.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/MinMaxLinesCoercer.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/StaticTextLayoutDrawParams.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
D compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextInlineContentLayoutDrawModifier.kt
D 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
A compose/foundation/foundation-newtext/src/test/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextLayouDrawParamsTest.kt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/public_plus_experimental_current.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
ti...@google.com <ti...@google.com> #9
Branch: androidx-main
commit 5753305834000e86fc9c886ce4941f4e5cf77dbf
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jan 05 15:07:42 2023
Cache minMaxLines in new TextUsingModifier
This is a substantial increase in work for measure compared to short text.
Added a LRU=1 cache for same text layout params (in the common case of repeated text styling).
In addition, each Modifier caches internally as well.
For size = 2
Gain (time abs)| Gain (time pct) | Gain (alloc abs)
288,610 | 10.04% | 15
Bug:
Test: benchmarks
Change-Id: Ie7d16a91c2395f315319d88eb71931db835688f2
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MinMaxLinesCoercer.kt
D 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
lp...@google.com <lp...@google.com> #10
Branch: androidx-main
commit 9b45a135e82b693385cdf79bd9fbd3d7803dc3c3
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Dec 21 15:17:03 2022
Modifier fixes:
* Selection now delegates onGloballyPositioned correctly
* invalidateDraw is now invalidateLayer (which works)
* Correctly restart when async typefaces resolve
Bug:
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: I7918144b56900e582908326556361cc033b967f2
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
ti...@google.com <ti...@google.com> #11
Branch: androidx-main
commit 325cdef1ab447cc50aeeed75a8b9af7865de23b6
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Dec 21 13:04:06 2022
Copypasta integrate selection with new modifier
This code depends on pointerInput to finalize.
For now, use remember to add lifecycle to node-like
StaticTextSelectionModifierController.
Also fixed typo s/ture/true/ linter found in presubmit
Bug:
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: I1992103b5e777a6e3e868080bb50081ee7d89fd7
M compose/foundation/foundation-newtext/build.gradle
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/ActualJvm.kt
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/ContextMenu.android.kt
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/StringHelpers.android.kt
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/TextPointerIcon.android.kt
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/TouchMode.kt
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/AndroidSelectionHandles.android.kt
A compose/foundation/foundation-newtext/src/androidMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionManager.android.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/ContextMenu.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/Expect.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/LongPressTextDragObserver.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/StringHelpers.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/TextLayoutResultProxy.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/TextPointerIcon.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/TouchMode.android.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/MultiWidgetSelectionDelegate.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/Selectable.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/Selection.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionAdjustment.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionContainer.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionHandles.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionMagnifier.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionManager.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionMode.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionRegistrar.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SelectionRegistrarImpl.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/SimpleLayout.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/TextPreparedSelection.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/TextSelectionColors.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/TextSelectionDelegate.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/copypasta/selection/TextSelectionMouseDetector.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextSelectionModifierController.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
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionAdjustment.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/selection/SelectionMode.kt
ad...@google.com <ad...@google.com>
lp...@google.com <lp...@google.com> #12
Branch: androidx-main
commit c4a2afae6c6487104d4a930b8165f142cc04389b
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Dec 21 13:38:57 2022
Fix inline content and enable tests
This is feature complete TextUsingModifier
Bug:
Test: ./gradlew :com:found--d-n-s-newtext:cAT
Change-Id: I788ebe18d09d44b2ad784853e1b0e11dc7bfbee3
M compose/foundation/foundation-newtext/src/androidAndroidTest/kotlin/androidx/compose/foundation/newtext/text/CoreTextInlineContentTest.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/AnnotatedStringResolveInlineContent.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCache.kt
ti...@google.com <ti...@google.com> #13
Branch: androidx-main
commit cd4c15184eedd3ccb6136ccb1ba2c8ab53f6d9b1
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Jan 09 18:52:04 2023
AnnotatedString now stores internal nullable lists
This avoids allocations during all map/sort etc operations when empty.
In Composition this saves two allocs for Text("Ok")
// before
300 allocs
// after
298 allocs
Test: :com:ui:ui-text:cAT :com:ui:ui-text:test
Test: bench
Bug:
Change-Id: I5a0cd09e174a4e6d0842a1480b1cb55bfb0ea767
M compose/ui/ui-text/src/androidMain/kotlin/androidx/compose/ui/text/platform/AndroidAccessibilitySpannableString.android.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/AnnotatedString.kt
M compose/ui/ui-text/src/commonMain/kotlin/androidx/compose/ui/text/Savers.kt
M compose/ui/ui-text/src/jvmMain/kotlin/androidx/compose/ui/text/JvmAnnotatedString.jvm.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/AnnotatedStringBuilderTest.kt
M compose/ui/ui-text/src/test/java/androidx/compose/ui/text/AnnotatedStringTest.kt
ad...@google.com <ad...@google.com>
ti...@google.com <ti...@google.com> #14
Branch: androidx-main
commit 383a62d168407ffee3590928cbe651cc87e0de80
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Jan 09 17:04:21 2023
Remove OnGloballyPositioned overhead from TextUsingBenchmark
This does not hit any profiled benchmarks, but will reduce the overall
cost of Text on a screen.
Test: bench
Bug:
Change-Id: Ic41a58bf39f02eca7b5bca998893093623ab05bf
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/SelectableStaticTextModifier.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
ad...@google.com <ad...@google.com> #15
Branch: androidx-main
commit ba0972437dc77a2da386c15f98093cf0028ae188
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Jan 11 17:20:01 2023
Rename modifier classes in preparation for String|AnnotatedString
Bug:
Change-Id: Ifa262aa01150b0cea5373881ccb51d9498ae2d2e
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/SelectableTextAnnotatedStringElement.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/SelectableTextAnnotatedStringNode.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextAnnotatedStringElement.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextAnnotatedStringNode.kt
lp...@google.com <lp...@google.com> #16
Branch: androidx-main
commit c33f346f6403266ee3fd76e34a0a9da749175310
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Jan 11 14:59:05 2023
Refactor StaticTextModifier to avoid params alloc
Instead, element directly mutates node.
LayoutCache became mutable as well.
// after
Connected to process 29220 on device 'google-pixel_3a_xl-8C1AX00FLZ'.
154,779 ns 127 allocs trace ModifierAllAppsSetText.recomposeOnly[size=2]
871,749 ns 297 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=2]
110,276 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=16]
724,428 ns 296 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=16]
60,532 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=32]
487,778 ns 296 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=32]
58,389 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=64]
545,027 ns 323 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=64]
// before
171,664 ns 128 allocs trace ModifierAllAppsSetText.recomposeOnly[size=2]
1,149,593 ns 299 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=2]
118,190 ns 127 allocs trace ModifierAllAppsSetText.recomposeOnly[size=16]
813,664 ns 298 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=16]
59,823 ns 127 allocs trace ModifierAllAppsSetText.recomposeOnly[size=32]
541,924 ns 298 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=32]
57,761 ns 127 allocs trace ModifierAllAppsSetText.recomposeOnly[size=64]
575,203 ns 324 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=64]
Bug:
Test: ./gradlew :com:found:found-d-n-s-newtext:test cAT
Change-Id: Id83cb48cfcf4f9d5017d7045d3babeeb3fbe6f3e
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
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/MinMaxLinesCoercer.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/SelectableStaticTextModifier.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/SelectableTextAnnotatedStringElement.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/SelectionController.kt
D compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextLayoutDrawParams.kt
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextModifier.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextAnnotatedStringElement.kt
M compose/foundation/foundation-newtext/src/test/kotlin/androidx/compose/foundation/newtext/text/modifiers/MultiParagraphLayoutCacheTest.kt
D compose/foundation/foundation-newtext/src/test/kotlin/androidx/compose/foundation/newtext/text/modifiers/StaticTextLayouDrawParamsTest.kt
ad...@google.com <ad...@google.com> #17
Branch: androidx-main
commit 9e1aa8ac0bf298ea252b9251930211d4a83a8dd5
Author: Sean McQuillan <seanmcq@google.com>
Date: Thu Jan 12 13:05:47 2023
Split String to a optimized path
Jump directly to Paragraph, skipping MultiParagraph
/// before
155,091 ns 127 allocs trace ModifierAllAppsSetText.recomposeOnly[size=2]
1,202,912 ns 297 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=2]
110,556 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=16]
722,395 ns 296 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=16]
59,376 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=32]
558,085 ns 296 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=32]
58,667 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=64]
618,217 ns 322 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=64]
/// after
154,641 ns 126 allocs trace ModifierAllAppsSetText.recomposeOnly[size=2]
836,262 ns 269 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=2]
111,169 ns 125 allocs trace ModifierAllAppsSetText.recomposeOnly[size=16]
639,055 ns 268 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=16]
59,712 ns 125 allocs trace ModifierAllAppsSetText.recomposeOnly[size=32]
469,161 ns 268 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=32]
58,248 ns 125 allocs trace ModifierAllAppsSetText.recomposeOnly[size=64]
522,301 ns 294 allocs trace ModifierAllAppsSetText.recomposeMeasureLayout[size=64]
Bug:
Test: ./gradlew :com:found:found-d-n-s-newtext:cAT test
Change-Id: I39dc3eaa3e2ba585d6a57b804e6d6da3aa973966
M compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/TextUsingModifier.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/ParagraphLayoutCache.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextStringSimpleElement.kt
A compose/foundation/foundation-newtext/src/commonMain/kotlin/androidx/compose/foundation/newtext/text/modifiers/TextStringSimpleNode.kt
ti...@google.com <ti...@google.com> #18
Branch: androidx-main
commit 90f4c99038ccfcfd3f004bc54b666b936de0dda2
Author: Sean McQuillan <seanmcq@google.com>
Date: Tue Mar 21 13:16:22 2023
Modifier based Text now correctly computes maxLines
Allow Paragaraph to decide maxLines for static text, like old BasicText.
Bug:
Test: :com:found:found:cAT
Change-Id: Iba8e03806a7a69cf7558bb1a966f0c080d2288d1
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCacheTest.kt
A compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCacheTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MinLinesConstrainer.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/MultiParagraphLayoutCache.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/modifiers/ParagraphLayoutCache.kt
ti...@google.com <ti...@google.com> #19
Branch: androidx-main
commit 3c50497658bbee90a40a88a3647ba1c485782d48
Author: Sean McQuillan <seanmcq@google.com>
Date: Mon Mar 20 14:23:18 2023
Enable the new Modifier-backed Text by default
Bug:
Test: cAT
Change-Id: Iada234d046dffb92e45c1a910f6976aa1dd339cf
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
lp...@google.com <lp...@google.com> #20
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.foundation:foundation:1.5.0-alpha02
ti...@google.com <ti...@google.com> #21
Branch: androidx-main
commit a79c4d456ce18733d152c08a72781f84af8bb8e0
Author: Sean McQuillan <seanmcq@google.com>
Date: Wed Apr 26 13:42:00 2023
Remove old text stack, stabilizing Text for 1.5 release.
This removes the old text stack completely, in preparation for the 1.5 release.
Bug:
Test: ./gradle :com:found:found:[test|cAT]
Relnote: "New text stack is newly stable in 1.5."
Relnote: "NewTextRendering1_5 configuration option is removed"
Change-Id: Id5f40ede246efd5679fde7500a7f90e2b6faa7d9
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/public_plus_experimental_current.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/TextUsingModifierMinMaxLinesTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/modifiers/BasicTextSemanticsTest.kt
M compose/foundation/foundation/src/androidAndroidTest/kotlin/androidx/compose/foundation/text/modifiers/TextStringSimpleNodeTest.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/AnnotatedStringResolveInlineContent.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/BasicText.kt
D compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/CoreText.kt
M compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextDelegate.kt
D compose/foundation/foundation/src/commonMain/kotlin/androidx/compose/foundation/text/TextUsingModifier.kt
D compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextControllerTest.kt
D compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextSelectionLongPressDragTest.kt
D compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/text/TextStateTest.kt
M compose/integration-tests/demos/src/main/java/androidx/compose/integration/demos/DemoApp.kt
M tv/tv-material/src/main/java/androidx/tv/material3/Text.kt
ad...@google.com <ad...@google.com> #22
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.tv:tv-material:1.0.0-alpha07
ti...@google.com <ti...@google.com> #23
Yes, that was also what I meant in #21 by "removing the dependency on animation from ui group."
Yuichi has kindly agreed to take on the task to move the animated vector work out of ui, therefore removing ui's dependency on animation-core. We can cherry-pick that change into release branch once it lands. (
I'll fix the tests' and sample's dependency on animation from ui in a follow-up CL.
ap...@google.com <ap...@google.com> #25
Branch: androidx-main
commit c9db3b353eb3f114fde65b0eea0d3ed93b29fee7
Author: Yuichi Araki <yaraki@google.com>
Date: Tue Jun 29 11:39:30 2021
Remove AnimatedImageVector and related APIs
These need to be moved out of 'ui'.
Relnote: "AnimatedImageVector was temporarily removed in order to change the module structure."
Bug: 160602714
Test: Other tests run
Change-Id: I419062b1b225003ee594f4d8522b11bb024144d6
M compose/integration-tests/docs-snippets/src/main/java/androidx/compose/integration/docs/resources/Resources.kt
M compose/ui/ui/api/current.ignore
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.ignore
M compose/ui/ui/api/restricted_current.txt
D compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/AnimatedVectorGraphicsDemo.kt
M compose/ui/ui/integration-tests/ui-demos/src/main/java/androidx/compose/ui/demos/UiDemos.kt
D compose/ui/ui/integration-tests/ui-demos/src/main/res/drawable/ic_hourglass_animated.xml
D compose/ui/ui/samples/src/main/java/androidx/compose/ui/samples/AnimatedVectorSample.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/graphics/vector/AnimatedImageVectorTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/graphics/vector/compat/XmlAnimatedVectorParserTest.kt
D compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/graphics/vector/compat/XmlAnimatorParserTest.kt
D compose/ui/ui/src/androidAndroidTest/res/animator/complex_background.xml
D compose/ui/ui/src/androidAndroidTest/res/animator/object_animator_1d.xml
D compose/ui/ui/src/androidAndroidTest/res/animator/object_animator_2d.xml
D compose/ui/ui/src/androidAndroidTest/res/animator/property_values_holders.xml
D compose/ui/ui/src/androidAndroidTest/res/animator/set.xml
D compose/ui/ui/src/androidAndroidTest/res/drawable/avd_complex.xml
D compose/ui/ui/src/androidAndroidTest/res/drawable/vd_complex.xml
D compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/graphics/vector/compat/XmlAnimatedVectorParser.android.kt
D compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/graphics/vector/compat/XmlAnimatorParser.android.kt
D compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/graphics/vector/compat/XmlPullParserUtils.android.kt
D compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/AnimatedVectorResources.android.kt
D compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/res/AnimatorResources.android.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/AnimatedImageVector.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/vector/Animator.kt
ap...@google.com <ap...@google.com> #26
Branch: androidx-main
commit fc869555e8d6ebab8d9f7fda20e20c1243114f53
Author: Doris Liu <tianliu@google.com>
Date: Mon Jun 28 21:30:02 2021
Sever ui's dependency on animation-core
Bug: 160602714
Test: Build and run tests
Relnote: "Moved InfiniteAnimationPolicy to :compose:ui"
Change-Id: I5eb09c7aa24a85fd2e66cc9b84ea6c906dc5210a
M compose/animation/animation-core/api/current.ignore
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/public_plus_experimental_current.txt
M compose/animation/animation-core/api/restricted_current.ignore
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation-core/benchmark/build.gradle
M compose/animation/animation-core/build.gradle
M compose/animation/animation-core/src/commonMain/kotlin/androidx/compose/animation/core/InfiniteAnimationPolicy.kt
M compose/ui/ui-test-junit4/build.gradle
M compose/ui/ui-test-junit4/src/androidMain/kotlin/androidx/compose/ui/test/junit4/AndroidComposeTestRule.android.kt
M compose/ui/ui-test-junit4/src/test/kotlin/androidx/compose/ui/test/junit4/InfiniteAnimationPolicyTest.kt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/public_plus_experimental_current.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/build.gradle
M compose/ui/ui/samples/build.gradle
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/platform/InfiniteAnimationPolicy.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/window/Application.desktop.kt
ti...@google.com <ti...@google.com> #27
It'd be nice to enforce the lib group dependency so it can only be one-way from higher level groups on lower level groups. Filed feature request at
sh...@gmail.com <sh...@gmail.com> #28
In 1.0.0 the animatedvectorresource and the AnimatedImageVector is missing. please release it as soon as possible as it is causing issues with my app. please sugest some workaround as my app heavely depend on it.
ti...@google.com <ti...@google.com> #29
Re #28:
AnimatedVectorResource will be included in the next Compose release in 1-2 weeks in a new lib: animation-graphics
. Stay tuned! Sorry for the inconvenience.
sh...@gmail.com <sh...@gmail.com> #30
Thanks
Description
with the module moves we end up with a cycle between module groups.
animation
depends oncore
andcore
depends onanimation-core
This is due to the AnimationClock ambient. If we break this dependency then we clear the cycle