Fixed
Status Update
Comments
ma...@google.com <ma...@google.com>
ma...@google.com <ma...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
https://android-review.googlesource.com/2649119
Branch: androidx-main
commit a330c0d3bcdd41326f37968a60e6084ad4a2e32c
Author: Chet Haase <chet@google.com>
Date: Wed Jul 05 07:26:46 2023
Convert APIs using PointF to use Float instead
PointF is a convenient mechanism for passing around x.y values
representing 2D points. But there are downsides, including:
- Converting to PointF: You may not have the data in PointF form
to begin with, so using an API which takes PointF requires converting
the data to that form (including allocating a PointF object every time)
- Mutability: Point structures can be mutated internally, causing
unpredictability in what that mutation means. Should the library
react to those changes? Ignore them? Do defensive copies (requiring
even more allocations)? Using primitive types like Float make the
behavior more obvious (by making the data inherently immutable).
- Allocations: Whenever we use object types, there are necessarily
allocations on the Java heap for them. This puts pressure on the GC
at both allocation and collection time. Given the amount of points
being passed around (especially at morph creation time, when curves
are being split and created), this causes a lot of PointF objects to
be allocated (even temporarily). Using Float avoids that problem.
Also fixed bug with unclosed paths causing discontinuity at the
start/end point.
Bug: 276466399
Bug: 290254314
Test: integration and unit tests pass
Relnote: PointF parameters changed to Float pairs
Change-Id: Id4705d27c7be31b26ade8186b99fffe2e2f8450e
M graphics/graphics-shapes/api/current.txt
M graphics/graphics-shapes/api/restricted_current.txt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicShapeTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/CubicTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonMeasureTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/PolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/RoundedPolygonTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/ShapesTest.kt
M graphics/graphics-shapes/src/androidTest/java/androidx/graphics/shapes/TestUtils.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Cubic.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/CubicShape.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FeatureMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/FloatMapping.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Morph.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/PolygonMeasure.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/RoundedPolygon.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Shapes.kt
M graphics/graphics-shapes/src/main/java/androidx/graphics/shapes/Utils.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/DebugDraw.kt
M graphics/integration-tests/testapp-compose/src/main/java/androidx/graphics/shapes/testcompose/ShapeEditor.kt
M graphics/integration-tests/testapp/src/main/java/androidx/graphics/shapes/test/MaterialShapes.kt
aj...@gmail.com <aj...@gmail.com> #3
Comment has been deleted.
az...@tab-trader.com <az...@tab-trader.com> #4
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.graphics:graphics-shapes:1.0.0-alpha04
ma...@google.com <ma...@google.com> #5
Thanks I think I was able to identify the issue and a potential fix
ap...@google.com <ap...@google.com> #6
Project: platform/frameworks/support
Branch: androidx-main
commit f1515ea14143b5754df3dcbcb47537eee49c30f2
Author: Mariano Martin <ymarian@google.com>
Date: Thu Sep 05 13:12:04 2024
[PullToRefresh] Fix issue where graphics layer doesnt invalidate
Test: tested manually that now graphics layer invalidates, in some edge cases
where pullToRefresh is used in fragments
Bug: 356039090
Change-Id: Ib80663f6dcf2f7f05bda4189b0931ee697230698
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pulltorefresh/PullToRefresh.kt
https://android-review.googlesource.com/3256138
Branch: androidx-main
commit f1515ea14143b5754df3dcbcb47537eee49c30f2
Author: Mariano Martin <ymarian@google.com>
Date: Thu Sep 05 13:12:04 2024
[PullToRefresh] Fix issue where graphics layer doesnt invalidate
Test: tested manually that now graphics layer invalidates, in some edge cases
where pullToRefresh is used in fragments
Bug: 356039090
Change-Id: Ib80663f6dcf2f7f05bda4189b0931ee697230698
M compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/pulltorefresh/PullToRefresh.kt
ma...@google.com <ma...@google.com>
pr...@google.com <pr...@google.com> #7
The following release(s) address this bug.It is possible this bug has only been partially addressed:
androidx.compose.material3:material3:1.4.0-alpha01
androidx.compose.material3:material3-android:1.4.0-alpha01
ap...@google.com <ap...@google.com> #8
Project: platform/frameworks/support
Branch: androidx-main
Author: Mariano Martin <
Link:
[WideNavigationRail] API Feedback
Expand for full commit details
[WideNavigationRail] API Feedback
Update State classes to use booleans, and current/target value.
Change expect/actual properties constructor.
Test: existing tests
Relnote: Change WideNavigationRailState to have current/target value, remove enums in favor of boolean.
Bug: 356039090
Change-Id: Idfa29aad7efd1d0e943bf175f5bcb1fc347fdf0e
Files:
- M
compose/material3/benchmark/src/androidTest/java/androidx/compose/material3/benchmark/NavigationRailBenchmark.kt
- M
compose/material3/material3/api/current.txt
- M
compose/material3/material3/api/restricted_current.txt
- M
compose/material3/material3/samples/src/main/java/androidx/compose/material3/samples/NavigationRailSamples.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ModalWideNavigationRailScreenshotTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/ModalWideNavigationRailTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/WideNavigationRailScreenshotTest.kt
- M
compose/material3/material3/src/androidInstrumentedTest/kotlin/androidx/compose/material3/WideNavigationRailTest.kt
- M
compose/material3/material3/src/androidMain/kotlin/androidx/compose/material3/WideNavigationRail.android.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/WideNavigationRail.kt
- M
compose/material3/material3/src/commonMain/kotlin/androidx/compose/material3/WideNavigationRailState.kt
- M
compose/material3/material3/src/commonStubsMain/kotlin/androidx/compose/material3/WideNavigationRail.commonStubs.kt
Hash: 724c3f7eb85d05c92ce724d5c529f579d771edd4
Date: Mon Nov 18 13:19:35 2024
Description
Jetpack Compose version: 1.6.8
Material Library Version (M2, M3 or Both?): material3 1.3.0-beta05
Material Compose component used: PullToRefreshBox
Android Studio Build: Android Studio Koala | 2024.1.1 Build #AI-241.15989.150.2411.11948838
Kotlin version: 1.9.24
Possibly related to https://issuetracker.google.com/issues/343505109
Steps to Reproduce:
Video Showcase:https://www.youtube.com/shorts/xOzNCZlT45Q
Code example: