Skip to content

Commit 42443f6

Browse files
authored
Remove tranparent paint hack from BackdropFilter (flutter#29929)
We can remove the hack because flutter/engine#8183 has been rolled into the framework.
1 parent 18a08a8 commit 42443f6

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

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

+1-10
Original file line numberDiff line numberDiff line change
@@ -1033,20 +1033,11 @@ class RenderBackdropFilter extends RenderProxyBox {
10331033
@override
10341034
bool get alwaysNeedsCompositing => child != null;
10351035

1036-
// TODO(liyuqian): remove this after updating the engine BackdropFilterLayer.
1037-
void _addTrasnparentPaint(PaintingContext context, Offset offset) {
1038-
// Draw a fully transparent paint to make sure that the cull rect won't be
1039-
// shrunk by Skia.
1040-
final Paint transparentPaint = Paint()..color = const Color(0x00000000);
1041-
context.canvas.drawPaint(transparentPaint);
1042-
super.paint(context, offset);
1043-
}
1044-
10451036
@override
10461037
void paint(PaintingContext context, Offset offset) {
10471038
if (child != null) {
10481039
assert(needsCompositing);
1049-
context.pushLayer(BackdropFilterLayer(filter: _filter), _addTrasnparentPaint, offset);
1040+
context.pushLayer(BackdropFilterLayer(filter: _filter), super.paint, offset);
10501041
}
10511042
}
10521043
}

0 commit comments

Comments
 (0)