Fixed
Status Update
Comments
al...@google.com <al...@google.com>
al...@google.com <al...@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
ap...@google.com <ap...@google.com> #3
PointF was the main (possibly only) mutability issue, marking this as fixed
to...@google.com <to...@google.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
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-main
commit 43ee99022437df7e76f1e86a53c3d22ac4bd3805
Author: Alan Viverette <alanv@google.com>
Date: Mon Mar 01 15:38:44 2021
Update Metalava hide annotations to include RequiresOptIn
Fixes API files for affected projects. Suppresses some warnings in Compose
Material library and changes visiblity as a workaround for @PublishedApi
in Compose UI library.
Bug: 174531520
Test: ./gradlew updateApi
Relnote: Enforce restrictions on public usage of experimental APIs
Merged-In: I6aa29518ed4d6a3821d921d2ae1a300e31183dcc
Change-Id: I6aa29518ed4d6a3821d921d2ae1a300e31183dcc
M buildSrc/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
M car/app/app/api/1.0.0-beta02.txt
M car/app/app/api/current.txt
M car/app/app/api/restricted_1.0.0-beta02.txt
M car/app/app/api/restricted_current.txt
M compose/animation/animation-core/api/1.0.0-beta02.txt
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/restricted_1.0.0-beta02.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation/api/1.0.0-beta02.txt
M compose/animation/animation/api/current.txt
M compose/animation/animation/api/restricted_1.0.0-beta02.txt
M compose/animation/animation/api/restricted_current.txt
M compose/foundation/foundation-layout/api/1.0.0-beta02.txt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/api/restricted_1.0.0-beta02.txt
M compose/foundation/foundation-layout/api/restricted_current.txt
M compose/foundation/foundation/api/1.0.0-beta02.txt
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_1.0.0-beta02.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/material/material/api/1.0.0-beta02.txt
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_1.0.0-beta02.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/runtime/runtime/api/1.0.0-beta02.txt
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/restricted_1.0.0-beta02.txt
M compose/runtime/runtime/api/restricted_current.txt
M compose/ui/ui-test/api/1.0.0-beta02.txt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta02.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_1.0.0-beta02.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/jvmMain/kotlin/androidx/compose/ui/test/TestMonotonicFrameClock.jvm.kt
M compose/ui/ui-text/api/1.0.0-beta02.txt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_1.0.0-beta02.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-tooling-data/api/1.0.0-beta02.txt
M compose/ui/ui-tooling-data/api/current.txt
M compose/ui/ui-tooling-data/api/restricted_1.0.0-beta02.txt
M compose/ui/ui-tooling-data/api/restricted_current.txt
M compose/ui/ui/api/1.0.0-beta02.txt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/restricted_1.0.0-beta02.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava3/api/current.txt
M datastore/datastore-rxjava3/api/restricted_current.txt
M paging/common/api/3.0.0-beta01.txt
M paging/common/api/3.0.0-beta02.txt
M paging/common/api/current.txt
M paging/common/api/restricted_3.0.0-beta01.txt
M paging/common/api/restricted_3.0.0-beta02.txt
M paging/common/api/restricted_current.txt
M paging/guava/api/3.0.0-beta01.txt
M paging/guava/api/3.0.0-beta02.txt
M paging/guava/api/current.txt
M paging/guava/api/restricted_3.0.0-beta01.txt
M paging/guava/api/restricted_3.0.0-beta02.txt
M paging/guava/api/restricted_current.txt
M paging/rxjava2/api/3.0.0-beta01.txt
M paging/rxjava2/api/3.0.0-beta02.txt
M paging/rxjava2/api/current.txt
M paging/rxjava2/api/restricted_3.0.0-beta01.txt
M paging/rxjava2/api/restricted_3.0.0-beta02.txt
M paging/rxjava2/api/restricted_current.txt
M paging/rxjava3/api/3.0.0-beta01.txt
M paging/rxjava3/api/3.0.0-beta02.txt
M paging/rxjava3/api/current.txt
M paging/rxjava3/api/public_plus_experimental_3.0.0-beta01.txt
M paging/rxjava3/api/public_plus_experimental_3.0.0-beta02.txt
M paging/rxjava3/api/public_plus_experimental_current.txt
M paging/rxjava3/api/restricted_3.0.0-beta01.txt
M paging/rxjava3/api/restricted_3.0.0-beta02.txt
M paging/rxjava3/api/restricted_current.txt
M paging/rxjava3/src/main/java/androidx/paging/rxjava3/PagingRx.kt
M room/runtime/api/2.3.0-beta02.txt
M room/runtime/api/2.3.0-beta03.txt
M room/runtime/api/current.txt
M room/runtime/api/restricted_2.3.0-beta02.txt
M room/runtime/api/restricted_2.3.0-beta03.txt
A room/runtime/api/restricted_current.ignore
M room/runtime/api/restricted_current.txt
https://android-review.googlesource.com/1595352
Branch: androidx-main
commit 43ee99022437df7e76f1e86a53c3d22ac4bd3805
Author: Alan Viverette <alanv@google.com>
Date: Mon Mar 01 15:38:44 2021
Update Metalava hide annotations to include RequiresOptIn
Fixes API files for affected projects. Suppresses some warnings in Compose
Material library and changes visiblity as a workaround for @PublishedApi
in Compose UI library.
Bug: 174531520
Test: ./gradlew updateApi
Relnote: Enforce restrictions on public usage of experimental APIs
Merged-In: I6aa29518ed4d6a3821d921d2ae1a300e31183dcc
Change-Id: I6aa29518ed4d6a3821d921d2ae1a300e31183dcc
M buildSrc/src/main/kotlin/androidx/build/metalava/MetalavaRunner.kt
M car/app/app/api/1.0.0-beta02.txt
M car/app/app/api/current.txt
M car/app/app/api/restricted_1.0.0-beta02.txt
M car/app/app/api/restricted_current.txt
M compose/animation/animation-core/api/1.0.0-beta02.txt
M compose/animation/animation-core/api/current.txt
M compose/animation/animation-core/api/restricted_1.0.0-beta02.txt
M compose/animation/animation-core/api/restricted_current.txt
M compose/animation/animation/api/1.0.0-beta02.txt
M compose/animation/animation/api/current.txt
M compose/animation/animation/api/restricted_1.0.0-beta02.txt
M compose/animation/animation/api/restricted_current.txt
M compose/foundation/foundation-layout/api/1.0.0-beta02.txt
M compose/foundation/foundation-layout/api/current.txt
M compose/foundation/foundation-layout/api/restricted_1.0.0-beta02.txt
M compose/foundation/foundation-layout/api/restricted_current.txt
M compose/foundation/foundation/api/1.0.0-beta02.txt
M compose/foundation/foundation/api/current.txt
M compose/foundation/foundation/api/restricted_1.0.0-beta02.txt
M compose/foundation/foundation/api/restricted_current.txt
M compose/material/material/api/1.0.0-beta02.txt
M compose/material/material/api/current.txt
M compose/material/material/api/restricted_1.0.0-beta02.txt
M compose/material/material/api/restricted_current.txt
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Drawer.kt
M compose/runtime/runtime/api/1.0.0-beta02.txt
M compose/runtime/runtime/api/current.txt
M compose/runtime/runtime/api/restricted_1.0.0-beta02.txt
M compose/runtime/runtime/api/restricted_current.txt
M compose/ui/ui-test/api/1.0.0-beta02.txt
M compose/ui/ui-test/api/current.txt
M compose/ui/ui-test/api/public_plus_experimental_1.0.0-beta02.txt
M compose/ui/ui-test/api/public_plus_experimental_current.txt
M compose/ui/ui-test/api/restricted_1.0.0-beta02.txt
M compose/ui/ui-test/api/restricted_current.txt
M compose/ui/ui-test/src/jvmMain/kotlin/androidx/compose/ui/test/TestMonotonicFrameClock.jvm.kt
M compose/ui/ui-text/api/1.0.0-beta02.txt
M compose/ui/ui-text/api/current.txt
M compose/ui/ui-text/api/restricted_1.0.0-beta02.txt
M compose/ui/ui-text/api/restricted_current.txt
M compose/ui/ui-tooling-data/api/1.0.0-beta02.txt
M compose/ui/ui-tooling-data/api/current.txt
M compose/ui/ui-tooling-data/api/restricted_1.0.0-beta02.txt
M compose/ui/ui-tooling-data/api/restricted_current.txt
M compose/ui/ui/api/1.0.0-beta02.txt
M compose/ui/ui/api/current.txt
M compose/ui/ui/api/restricted_1.0.0-beta02.txt
M compose/ui/ui/api/restricted_current.txt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/WindowRecomposer.android.kt
M datastore/datastore-rxjava2/api/current.txt
M datastore/datastore-rxjava2/api/restricted_current.txt
M datastore/datastore-rxjava3/api/current.txt
M datastore/datastore-rxjava3/api/restricted_current.txt
M paging/common/api/3.0.0-beta01.txt
M paging/common/api/3.0.0-beta02.txt
M paging/common/api/current.txt
M paging/common/api/restricted_3.0.0-beta01.txt
M paging/common/api/restricted_3.0.0-beta02.txt
M paging/common/api/restricted_current.txt
M paging/guava/api/3.0.0-beta01.txt
M paging/guava/api/3.0.0-beta02.txt
M paging/guava/api/current.txt
M paging/guava/api/restricted_3.0.0-beta01.txt
M paging/guava/api/restricted_3.0.0-beta02.txt
M paging/guava/api/restricted_current.txt
M paging/rxjava2/api/3.0.0-beta01.txt
M paging/rxjava2/api/3.0.0-beta02.txt
M paging/rxjava2/api/current.txt
M paging/rxjava2/api/restricted_3.0.0-beta01.txt
M paging/rxjava2/api/restricted_3.0.0-beta02.txt
M paging/rxjava2/api/restricted_current.txt
M paging/rxjava3/api/3.0.0-beta01.txt
M paging/rxjava3/api/3.0.0-beta02.txt
M paging/rxjava3/api/current.txt
M paging/rxjava3/api/public_plus_experimental_3.0.0-beta01.txt
M paging/rxjava3/api/public_plus_experimental_3.0.0-beta02.txt
M paging/rxjava3/api/public_plus_experimental_current.txt
M paging/rxjava3/api/restricted_3.0.0-beta01.txt
M paging/rxjava3/api/restricted_3.0.0-beta02.txt
M paging/rxjava3/api/restricted_current.txt
M paging/rxjava3/src/main/java/androidx/paging/rxjava3/PagingRx.kt
M room/runtime/api/2.3.0-beta02.txt
M room/runtime/api/2.3.0-beta03.txt
M room/runtime/api/current.txt
M room/runtime/api/restricted_2.3.0-beta02.txt
M room/runtime/api/restricted_2.3.0-beta03.txt
A room/runtime/api/restricted_current.ignore
M room/runtime/api/restricted_current.txt
Description