From 9a726e8542681326d91d0d750d3f268941603d0c Mon Sep 17 00:00:00 2001 From: Michael Goderbauer Date: Fri, 21 Jul 2023 15:59:01 -0700 Subject: [PATCH] Remove obsolete work around for shadow drawing (#131066) Fixes https://github.com/flutter/flutter/issues/130737. --- packages/flutter/lib/src/rendering/proxy_box.dart | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index a089fbe145..441ca66ea1 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -1908,8 +1908,6 @@ abstract class _RenderPhysicalModelBase extends _RenderCustomClip { } } -final Paint _transparentPaint = Paint()..color = const Color(0x00000000); - /// Creates a physical model layer that clips its child to a rounded /// rectangle. /// @@ -2113,7 +2111,6 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase { } _updateClip(); - final Rect offsetBounds = offset & size; final Path offsetPath = _clip!.shift(offset); bool paintShadows = true; assert(() { @@ -2134,14 +2131,6 @@ class RenderPhysicalShape extends _RenderPhysicalModelBase { final Canvas canvas = context.canvas; if (elevation != 0.0 && paintShadows) { - // The drawShadow call doesn't add the region of the shadow to the - // picture's bounds, so we draw a hardcoded amount of extra space to - // account for the maximum potential area of the shadow. - // TODO(jsimmons): remove this when Skia does it for us. - canvas.drawRect( - offsetBounds.inflate(20.0), - _transparentPaint, - ); canvas.drawShadow( offsetPath, shadowColor,