Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 6d731c979b285603be0e6efbf978e8ad7b2f6fef
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 11 19:45:23 2020
Introduce GraphicsLayerScope and a new Modifier.drawLayer overload
This overload allows to provide a lambda block on GraphicsLayerScope where you define the layer parameters in a way which allows to skip recomposition and relayout when the state change happens. DrawLayerModifier is now internal in preparation to migrating its logic into placeable.placeWithLayer() method of LayoutModifier
Relnote: Added a new Modifier.drawLayer() overload. It takes a lambda block on a new GraphicsLayerScope where you define the layer parameters in a way which allows to skip recomposition and relayout when the state change happens. DrawLayerModifier is now internal in preparation to migrating its logic into placeable.placeWithLayer() method of LayoutModifier
Test: ./gradlew bOs
Bug: 173030831
Change-Id: I15e9f41e3c93245529bf798e4a9617ca49d5e509
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Menu.kt
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/ModifierInfoTest.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/samples/src/main/java/androidx/compose/ui/samples/LayerModifierSamples.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/ClipDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawLayerModifierTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawReorderingTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawLayerModifier.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/TransformOrigin.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
A compose/ui/ui/src/test/kotlin/androidx/compose/ui/graphics/GraphicsLayerScopeTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
M development/build_log_simplifier/messages.ignore
https://android-review.googlesource.com/1496274
Branch: androidx-master-dev
commit 6d731c979b285603be0e6efbf978e8ad7b2f6fef
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 11 19:45:23 2020
Introduce GraphicsLayerScope and a new Modifier.drawLayer overload
This overload allows to provide a lambda block on GraphicsLayerScope where you define the layer parameters in a way which allows to skip recomposition and relayout when the state change happens. DrawLayerModifier is now internal in preparation to migrating its logic into placeable.placeWithLayer() method of LayoutModifier
Relnote: Added a new Modifier.drawLayer() overload. It takes a lambda block on a new GraphicsLayerScope where you define the layer parameters in a way which allows to skip recomposition and relayout when the state change happens. DrawLayerModifier is now internal in preparation to migrating its logic into placeable.placeWithLayer() method of LayoutModifier
Test: ./gradlew bOs
Bug: 173030831
Change-Id: I15e9f41e3c93245529bf798e4a9617ca49d5e509
M compose/material/material/src/commonMain/kotlin/androidx/compose/material/Menu.kt
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/ModifierInfoTest.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/samples/src/main/java/androidx/compose/ui/samples/LayerModifierSamples.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/ClipDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawLayerModifierTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawReorderingTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/draw/DrawShadowTest.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawLayerModifier.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/TransformOrigin.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/graphics/GraphicsLayerScope.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
A compose/ui/ui/src/test/kotlin/androidx/compose/ui/graphics/GraphicsLayerScopeTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
M development/build_log_simplifier/messages.ignore
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 13624979ffb0ad24cc8a27cf6eb71306dc78deec
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 11 19:44:39 2020
Abstract away OwnerLayer implementations from DrawLayerModifier and snapshot observation
Not using DrawLayerModifier will help layers implementations to be more flexible and allow us to refactor DrawLayerModifier without affecting OwnerLayers. Moving snapshot observation to LayerWrapper will help make layers implementation simpler and also introduces layer param updates observation for desktop as it wasn't previously implemented
Relnote: N/A
Bug: 173030831
Test: ./gradlew bOs
Change-Id: I362955971c3fb5069d1da0ee83a1de134a46aaf4
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/gestures/SuspendingGestureTestUtil.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/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/DeviceRenderNode.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi23.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi29.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OwnedLayer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OwnerSnapshotObserver.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/SkijaLayer.kt
M compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/SkijaLayerTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
https://android-review.googlesource.com/1496273
Branch: androidx-master-dev
commit 13624979ffb0ad24cc8a27cf6eb71306dc78deec
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 11 19:44:39 2020
Abstract away OwnerLayer implementations from DrawLayerModifier and snapshot observation
Not using DrawLayerModifier will help layers implementations to be more flexible and allow us to refactor DrawLayerModifier without affecting OwnerLayers. Moving snapshot observation to LayerWrapper will help make layers implementation simpler and also introduces layer param updates observation for desktop as it wasn't previously implemented
Relnote: N/A
Bug: 173030831
Test: ./gradlew bOs
Change-Id: I362955971c3fb5069d1da0ee83a1de134a46aaf4
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/gestures/SuspendingGestureTestUtil.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/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/DeviceRenderNode.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi23.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi29.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeLayer.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OwnedLayer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OwnerSnapshotObserver.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/SkijaLayer.kt
M compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/SkijaLayerTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
ap...@google.com <ap...@google.com> #4
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d82950bac68c7d46151811d7076b1defef54a61b
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 11 15:23:18 2020
Extract snapshot observation from owner implementations to OwnerSnapshotObserver
This allows to unify this logic between AndroidOwner and DesktopOwner plus hide the observation from the public api.
Relnote: N/A
Bug: 173030831
Test: ./gradlew bOS
Change-Id: If10b00fc78ac4c37ce49e53adcdc766fa152f92a
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/gestures/SuspendingGestureTestUtil.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/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/Helpers.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi23.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi29.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedDrawNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OwnerSnapshotObserver.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopOwnerTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
https://android-review.googlesource.com/1496265
Branch: androidx-master-dev
commit d82950bac68c7d46151811d7076b1defef54a61b
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 11 15:23:18 2020
Extract snapshot observation from owner implementations to OwnerSnapshotObserver
This allows to unify this logic between AndroidOwner and DesktopOwner plus hide the observation from the public api.
Relnote: N/A
Bug: 173030831
Test: ./gradlew bOS
Change-Id: If10b00fc78ac4c37ce49e53adcdc766fa152f92a
M compose/foundation/foundation/src/test/kotlin/androidx/compose/foundation/gestures/SuspendingGestureTestUtil.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/src/androidAndroidTest/kotlin/androidx/compose/ui/input/pointer/PointerInputEventProcessorTest.kt
M compose/ui/ui/src/androidAndroidTest/kotlin/androidx/compose/ui/layout/Helpers.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi23.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/RenderNodeApi29.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/ViewLayer.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedDrawNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/Owner.kt
A compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OwnerSnapshotObserver.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/desktopTest/kotlin/androidx/compose/ui/platform/DesktopOwnerTest.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
ap...@google.com <ap...@google.com> #5
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 1102527720dfd1d2de0e11e0d769439a3700fb58
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 18 19:23:35 2020
Introduce placeable.placeWithLayer
We decided to integrate functionality currently available as DrawLayerModifier right inside the Layout system.
Why to do so:
1) To allow custom layouts to insert the layers for the children if they need to. For example It is needed in LazyColumn as an optimization ( b/170296989 )
2) Allows to simplify the system by having less concepts. Now DrawLayerModifier is a whole separate concept. With integrating layers right inside the layout system Modifier.drawLayer() will be implemented just as a simple LayoutModifier with DrawLayerModifier class being removed. We already did the same thing with ZIndexModifier ( b/171493718 )
Relnote: New methods placeable.placeWithLayer() and placeable.placeRelativeWithLayer() were added which allows custom layouts and layout modifiers to place a child with introducing a graphics layer for their drawing. Having that we can first optimize redrawings, so when we need to move a child we don't have to redraw its content, second we can apply draw transformations for a child
Bug: 173030831
Test: New tests, existing tests are passing
Change-Id: Ibd8f6bb03f391c3f1bbf13f659d79e3b57019a46
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/BoundsTest.kt
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/ModifierInfoTest.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/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawLayerModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Placeable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/RootMeasureBlocks.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedDrawNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedLayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
https://android-review.googlesource.com/1503751
Branch: androidx-master-dev
commit 1102527720dfd1d2de0e11e0d769439a3700fb58
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Wed Nov 18 19:23:35 2020
Introduce placeable.placeWithLayer
We decided to integrate functionality currently available as DrawLayerModifier right inside the Layout system.
Why to do so:
1) To allow custom layouts to insert the layers for the children if they need to. For example It is needed in LazyColumn as an optimization (
2) Allows to simplify the system by having less concepts. Now DrawLayerModifier is a whole separate concept. With integrating layers right inside the layout system Modifier.drawLayer() will be implemented just as a simple LayoutModifier with DrawLayerModifier class being removed. We already did the same thing with ZIndexModifier (
Relnote: New methods placeable.placeWithLayer() and placeable.placeRelativeWithLayer() were added which allows custom layouts and layout modifiers to place a child with introducing a graphics layer for their drawing. Having that we can first optimize redrawings, so when we need to move a child we don't have to redraw its content, second we can apply draw transformations for a child
Bug: 173030831
Test: New tests, existing tests are passing
Change-Id: Ibd8f6bb03f391c3f1bbf13f659d79e3b57019a46
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/BoundsTest.kt
M compose/ui/ui-tooling/src/androidTest/java/androidx/compose/ui/tooling/ModifierInfoTest.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/src/androidAndroidTest/kotlin/androidx/compose/ui/AndroidLayoutDrawTest.kt
M compose/ui/ui/src/androidMain/kotlin/androidx/compose/ui/platform/AndroidComposeView.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/DrawLayerModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Layout.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/LayoutModifier.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/Placeable.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/layout/RootMeasureBlocks.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DelegatingLayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/InnerPlaceable.kt
D compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayerWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/LayoutNodeWrapper.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedDrawNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/ModifiedLayoutNode.kt
M compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/OuterMeasurablePlaceable.kt
M compose/ui/ui/src/desktopMain/kotlin/androidx/compose/ui/platform/DesktopOwner.kt
M compose/ui/ui/src/test/kotlin/androidx/compose/ui/node/LayoutNodeTest.kt
Description
Why to do so:
1) To allow custom layouts to insert the layers for the children if they need to. For example It is needed in LazyColumn as an optimization (
2) Allows to simplify the system by having less concepts. Now DrawLayerModifier is a whole separate concept. With integrating layers right inside the layout system Modifier.drawLayer() will be implemented just as a simple LayoutModifier with DrawLayerModifier class being removed. We already did the same thing with ZIndexModifier (