Skip to content

Commit 6f66113

Browse files
authored
Reland "Remove obsolete drawShadow bounds workaround (flutter#127052)" (flutter#127231)
This workaround was created 6 years ago with no links to bug databases to track. As best we can determine, the issue is no longer present in SkPicture or DisplayList and is most likely obsolete. More importantly, though, non-rendering primitives are ignored by the DisplayList construction and so this workaround will just be ignored anyway. If a problem surfaces about this issue that we haven't discovered by a thorough code search of the current code base, then workarounds should be installed within the relevant implementation modules rather than in the framework (and documented with bugs filed in either or both of Flutter's github repos, and/or the Skia issue database). Workaround originally created in this PR: flutter#9654
1 parent 0845d0d commit 6f66113

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

packages/flutter/lib/src/rendering/proxy_box.dart

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1999,7 +1999,6 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
19991999

20002000
_updateClip();
20012001
final RRect offsetRRect = _clip!.shift(offset);
2002-
final Rect offsetBounds = offsetRRect.outerRect;
20032002
final Path offsetRRectAsPath = Path()..addRRect(offsetRRect);
20042003
bool paintShadows = true;
20052004
assert(() {
@@ -2020,14 +2019,6 @@ class RenderPhysicalModel extends _RenderPhysicalModelBase<RRect> {
20202019

20212020
final Canvas canvas = context.canvas;
20222021
if (elevation != 0.0 && paintShadows) {
2023-
// The drawShadow call doesn't add the region of the shadow to the
2024-
// picture's bounds, so we draw a hardcoded amount of extra space to
2025-
// account for the maximum potential area of the shadow.
2026-
// TODO(jsimmons): remove this when Skia does it for us.
2027-
canvas.drawRect(
2028-
offsetBounds.inflate(20.0),
2029-
_transparentPaint,
2030-
);
20312022
canvas.drawShadow(
20322023
offsetRRectAsPath,
20332024
shadowColor,

0 commit comments

Comments
 (0)