deprecate pushPhysicalLayer (flutter/engine#35566)

This commit is contained in:
Jonah Williams
2022-08-22 10:52:11 -07:00
committed by GitHub
parent 5ab1c6712d
commit 7e68c788d7
3 changed files with 9 additions and 0 deletions

View File

@@ -625,6 +625,10 @@ class SceneBuilder extends NativeFieldWrapperClass1 {
/// {@macro dart.ui.sceneBuilder.oldLayerVsRetained}
///
/// See [pop] for details about the operation stack, and [Clip] for different clip modes.
@Deprecated(
'Use a clip and canvas operations directly (See RenderPhysicalModel). '
'This feature was deprecated after v3.1.0-0.0.pre.',
)
PhysicalShapeEngineLayer pushPhysicalShape({
required Path path,
required double elevation,

View File

@@ -89,6 +89,10 @@ abstract class SceneBuilder {
ShaderMaskEngineLayer? oldLayer,
FilterQuality filterQuality = FilterQuality.low,
});
@Deprecated(
'Use a clip and canvas operations directly (See RenderPhysicalModel). '
'This feature was deprecated after v3.1.0-0.0.pre.',
)
PhysicalShapeEngineLayer pushPhysicalShape({
required Path path,
required double elevation,

View File

@@ -382,6 +382,7 @@ void main() {
);
});
testNoSharing((SceneBuilder builder, EngineLayer? oldLayer) {
// ignore: deprecated_member_use
return builder.pushPhysicalShape(path: Path(), color: const Color.fromARGB(0, 0, 0, 0), oldLayer: oldLayer as PhysicalShapeEngineLayer?, elevation: 0.0);
});
testNoSharing((SceneBuilder builder, EngineLayer? oldLayer) {