Fixed
Status Update
Comments
er...@google.com <er...@google.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
g....@gmail.com <g....@gmail.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
er...@google.com <er...@google.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
er...@google.com <er...@google.com>
er...@google.com <er...@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
mi...@gmail.com <mi...@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
er...@google.com <er...@google.com> #7
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2380657
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
wu...@google.com <wu...@google.com>
er...@google.com <er...@google.com> #8
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2378103
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
sc...@google.com <sc...@google.com> #9
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2376866
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
sc...@google.com <sc...@google.com>
ch...@google.com <ch...@google.com>
ap...@google.com <ap...@google.com> #10
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2366969
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
ch...@google.com <ch...@google.com> #11
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2366929
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
aa...@gmail.com <aa...@gmail.com> #12
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2366889
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
ch...@google.com <ch...@google.com> #13
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2380668
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
aa...@gmail.com <aa...@gmail.com> #14
Project: platform/frameworks/support
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: b/246960758
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
https://android-review.googlesource.com/2380666
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
Description
I was not expecting to have the same output size, especially if we consider the different resolutions of the cameras, but I think the difference is in this case too much.
I see that CameraX is currently not specifying the compression quality, so I assume each device uses whatever the manufacturer defined. It would be great to have a way to define the compression quality not to have to manually compress the JPEG, which is can easily lead to OOM issues.
Related to this, I also noticed that in case the picture is cropped (which is not my case), the compression quality is set to 100, which may not be desired.