Fixed
Status Update
Comments
ap...@google.com <ap...@google.com> #2
Project: platform/frameworks/support
Branch: androidx-master-dev
commit d3b694df03e336c51adeacea9c30dc55dbf65fc9
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Mon Mar 30 19:20:34 2020
Manual drawing reordering
Originally we tried to use the auto redrawing based on RenderNode's elevation which proved to be tricky to support and caused a number of bugs. Instead of relaying on this mechanism we decided to decouple shadows size from z index as features and this CL is a first part of it. Here we still use DrawLayerModifier's elevation as a zIndex, but we do the drawing reordering manually.
This should also improve the drawing performance as we invalidate less(on apis < 29) and do expensive enableZ calls less often.
Fixes: 152600006
Fixes: 152696056
Bug: 151818355
Bug: 152417501
Test: new tests, manually
Change-Id: I45aa0e751b9d3bba74babcd25a835d8b34b99c24
M ui/ui-android-view/src/androidTest/java/androidx/ui/androidview/test/ComposedViewTest.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
A ui/ui-framework/src/androidTest/java/androidx/ui/core/test/DrawReorderingTest.kt
M ui/ui-graphics/src/main/java/androidx/ui/graphics/AndroidCanvas.kt
M ui/ui-platform/api/0.1.0-dev09.txt
M ui/ui-platform/api/current.txt
M ui/ui-platform/api/public_plus_experimental_0.1.0-dev09.txt
M ui/ui-platform/api/public_plus_experimental_current.txt
M ui/ui-platform/api/restricted_0.1.0-dev09.txt
M ui/ui-platform/api/restricted_current.txt
M ui/ui-platform/build.gradle
M ui/ui-platform/src/main/java/androidx/ui/core/AndroidOwner.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
M ui/ui-platform/src/main/java/androidx/ui/core/LayoutNodeWrapper.kt
M ui/ui-platform/src/main/java/androidx/ui/core/OwnedLayer.kt
M ui/ui-platform/src/main/java/androidx/ui/core/Owner.kt
M ui/ui-platform/src/main/java/androidx/ui/core/RenderNodeLayer.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ViewLayer.kt
A ui/ui-platform/src/main/java/androidx/ui/core/ViewLayerContainer.kt
A ui/ui-platform/src/proguard-rules.pro
https://android-review.googlesource.com/1272904
Branch: androidx-master-dev
commit d3b694df03e336c51adeacea9c30dc55dbf65fc9
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Mon Mar 30 19:20:34 2020
Manual drawing reordering
Originally we tried to use the auto redrawing based on RenderNode's elevation which proved to be tricky to support and caused a number of bugs. Instead of relaying on this mechanism we decided to decouple shadows size from z index as features and this CL is a first part of it. Here we still use DrawLayerModifier's elevation as a zIndex, but we do the drawing reordering manually.
This should also improve the drawing performance as we invalidate less(on apis < 29) and do expensive enableZ calls less often.
Fixes: 152600006
Fixes: 152696056
Bug: 151818355
Bug: 152417501
Test: new tests, manually
Change-Id: I45aa0e751b9d3bba74babcd25a835d8b34b99c24
M ui/ui-android-view/src/androidTest/java/androidx/ui/androidview/test/ComposedViewTest.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
A ui/ui-framework/src/androidTest/java/androidx/ui/core/test/DrawReorderingTest.kt
M ui/ui-graphics/src/main/java/androidx/ui/graphics/AndroidCanvas.kt
M ui/ui-platform/api/0.1.0-dev09.txt
M ui/ui-platform/api/current.txt
M ui/ui-platform/api/public_plus_experimental_0.1.0-dev09.txt
M ui/ui-platform/api/public_plus_experimental_current.txt
M ui/ui-platform/api/restricted_0.1.0-dev09.txt
M ui/ui-platform/api/restricted_current.txt
M ui/ui-platform/build.gradle
M ui/ui-platform/src/main/java/androidx/ui/core/AndroidOwner.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
M ui/ui-platform/src/main/java/androidx/ui/core/LayoutNodeWrapper.kt
M ui/ui-platform/src/main/java/androidx/ui/core/OwnedLayer.kt
M ui/ui-platform/src/main/java/androidx/ui/core/Owner.kt
M ui/ui-platform/src/main/java/androidx/ui/core/RenderNodeLayer.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ViewLayer.kt
A ui/ui-platform/src/main/java/androidx/ui/core/ViewLayerContainer.kt
A ui/ui-platform/src/proguard-rules.pro
ap...@google.com <ap...@google.com> #3
Project: platform/frameworks/support
Branch: androidx-master-dev
commit 3023c223fbd386c10889df6f1e8cfe73787cc844
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Fri Apr 17 21:07:37 2020
zIndex modifier
A new modifier which will control the drawing order. elevation property on DrawLayerModifier is renamed to shadowElevation and doesn't control the drawing order anymore. This allows us to decouple this two features with making it even more flexible: we now can control the children drawing order without changing the elevation which results in the shadow being drawn, but sometimes you just want to change the drawing order without additional side effects.
To keep the familiar behavior the Material API layer will use the term elevation and the value passed to the Surface will be used as both shadow elevation and zIndex.
Also the order of the params on drawShadow() is changed: it seems like the elevation is more important and should be the first param and the shape as a second one with a new default - RectangleShape.
Relnote: New Modifier.zIndex() is added to control the drawing order of the children within the same parent layout. elevation property on DrawLayerModifier is renamed to shadowElevation and doesn't control the drawing order anymore. The params order fo DrawShadow is changed: elevation is now the first one and the shape is the second one with a RectangleShape default.
Bug: 152417501
Test: new tests
Change-Id: I201506a33a55a4c48a4dbb6fe4e580824410588f
M ui/ui-core/api/0.1.0-dev10.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev10.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev10.txt
M ui/ui-core/api/restricted_current.txt
A ui/ui-core/samples/src/main/java/androidx/ui/core/samples/ZIndexModifierSample.kt
M ui/ui-core/src/main/java/androidx/ui/core/DrawLayerModifier.kt
A ui/ui-core/src/main/java/androidx/ui/core/ZIndexModifier.kt
M ui/ui-framework/api/0.1.0-dev10.txt
M ui/ui-framework/api/current.txt
M ui/ui-framework/api/public_plus_experimental_0.1.0-dev10.txt
M ui/ui-framework/api/public_plus_experimental_current.txt
M ui/ui-framework/api/restricted_0.1.0-dev10.txt
M ui/ui-framework/api/restricted_current.txt
M ui/ui-framework/samples/src/main/java/androidx/ui/framework/samples/DrawShadowSample.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/DrawReorderingTest.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/DrawShadowTest.kt
M ui/ui-framework/src/main/java/androidx/ui/core/DrawShadow.kt
A ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/Surface.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
M ui/ui-platform/src/main/java/androidx/ui/core/RenderNodeLayer.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ViewLayer.kt
https://android-review.googlesource.com/1289013
Branch: androidx-master-dev
commit 3023c223fbd386c10889df6f1e8cfe73787cc844
Author: Andrey Kulikov <andreykulikov@google.com>
Date: Fri Apr 17 21:07:37 2020
zIndex modifier
A new modifier which will control the drawing order. elevation property on DrawLayerModifier is renamed to shadowElevation and doesn't control the drawing order anymore. This allows us to decouple this two features with making it even more flexible: we now can control the children drawing order without changing the elevation which results in the shadow being drawn, but sometimes you just want to change the drawing order without additional side effects.
To keep the familiar behavior the Material API layer will use the term elevation and the value passed to the Surface will be used as both shadow elevation and zIndex.
Also the order of the params on drawShadow() is changed: it seems like the elevation is more important and should be the first param and the shape as a second one with a new default - RectangleShape.
Relnote: New Modifier.zIndex() is added to control the drawing order of the children within the same parent layout. elevation property on DrawLayerModifier is renamed to shadowElevation and doesn't control the drawing order anymore. The params order fo DrawShadow is changed: elevation is now the first one and the shape is the second one with a RectangleShape default.
Bug: 152417501
Test: new tests
Change-Id: I201506a33a55a4c48a4dbb6fe4e580824410588f
M ui/ui-core/api/0.1.0-dev10.txt
M ui/ui-core/api/current.txt
M ui/ui-core/api/public_plus_experimental_0.1.0-dev10.txt
M ui/ui-core/api/public_plus_experimental_current.txt
M ui/ui-core/api/restricted_0.1.0-dev10.txt
M ui/ui-core/api/restricted_current.txt
A ui/ui-core/samples/src/main/java/androidx/ui/core/samples/ZIndexModifierSample.kt
M ui/ui-core/src/main/java/androidx/ui/core/DrawLayerModifier.kt
A ui/ui-core/src/main/java/androidx/ui/core/ZIndexModifier.kt
M ui/ui-framework/api/0.1.0-dev10.txt
M ui/ui-framework/api/current.txt
M ui/ui-framework/api/public_plus_experimental_0.1.0-dev10.txt
M ui/ui-framework/api/public_plus_experimental_current.txt
M ui/ui-framework/api/restricted_0.1.0-dev10.txt
M ui/ui-framework/api/restricted_current.txt
M ui/ui-framework/samples/src/main/java/androidx/ui/framework/samples/DrawShadowSample.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/AndroidLayoutDrawTest.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/DrawReorderingTest.kt
M ui/ui-framework/src/androidTest/java/androidx/ui/core/test/DrawShadowTest.kt
M ui/ui-framework/src/main/java/androidx/ui/core/DrawShadow.kt
A ui/ui-material/src/androidTest/java/androidx/ui/material/SurfaceTest.kt
M ui/ui-material/src/main/java/androidx/ui/material/Surface.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ComponentNodes.kt
M ui/ui-platform/src/main/java/androidx/ui/core/RenderNodeLayer.kt
M ui/ui-platform/src/main/java/androidx/ui/core/ViewLayer.kt
Description