Fixed
Status Update
Comments
st...@google.com <st...@google.com>
ha...@google.com <ha...@google.com> #2
Validated that doing this change doesn't impact performance and leads to minor improvements for PositionIndicator:
Existing PI:
With drawWithCache change:
ha...@google.com <ha...@google.com>
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-main
commit fe1be88974e261d8959a9877adadb95e0c6de7d5
Author: hardik <hardikkwl@google.com>
Date: Mon Jul 10 16:37:39 2023
Using drawWithCache in PositionIndicator, ProgressIndicator, and SelectionControls to optimize stroke allocations.
Relnote: Using drawWithCache in PositionIndicator, ProgressIndicator, and SelectionControls to optimize stroke allocations.
Bug: 288234617
Test: Macrobenchmark test
Change-Id: I5f225ef77dfe39670fb7efb4fda193cd7867eacf
M wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/SelectionControls.kt
M wear/compose/compose-material/src/main/java/androidx/wear/compose/material/PositionIndicator.kt
M wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ProgressIndicator.kt
M wear/compose/integration-tests/macrobenchmark-target/src/main/AndroidManifest.xml
A wear/compose/integration-tests/macrobenchmark-target/src/main/java/androidx/wear/compose/integration/macrobenchmark/target/PositionIndicatorActivity.kt
A wear/compose/integration-tests/macrobenchmark/src/main/java/androidx/wear/compose/integration/macrobenchmark/PositionIndicatorBenchmark.kt
https://android-review.googlesource.com/2659737
Branch: androidx-main
commit fe1be88974e261d8959a9877adadb95e0c6de7d5
Author: hardik <hardikkwl@google.com>
Date: Mon Jul 10 16:37:39 2023
Using drawWithCache in PositionIndicator, ProgressIndicator, and SelectionControls to optimize stroke allocations.
Relnote: Using drawWithCache in PositionIndicator, ProgressIndicator, and SelectionControls to optimize stroke allocations.
Bug: 288234617
Test: Macrobenchmark test
Change-Id: I5f225ef77dfe39670fb7efb4fda193cd7867eacf
M wear/compose/compose-material-core/src/main/java/androidx/wear/compose/materialcore/SelectionControls.kt
M wear/compose/compose-material/src/main/java/androidx/wear/compose/material/PositionIndicator.kt
M wear/compose/compose-material/src/main/java/androidx/wear/compose/material/ProgressIndicator.kt
M wear/compose/integration-tests/macrobenchmark-target/src/main/AndroidManifest.xml
A wear/compose/integration-tests/macrobenchmark-target/src/main/java/androidx/wear/compose/integration/macrobenchmark/target/PositionIndicatorActivity.kt
A wear/compose/integration-tests/macrobenchmark/src/main/java/androidx/wear/compose/integration/macrobenchmark/PositionIndicatorBenchmark.kt
na...@google.com <na...@google.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.wear.compose:compose-material:1.3.0-alpha03
androidx.wear.compose:compose-material-core:1.3.0-alpha03
Description
please use Modifier.drawWithCache() in
Wear ProgressIndicator
Wear PositionIndicator
Wear ToggleControl
In order to not allocate a Stroke on every draw