From 42443f66313b5ca3669b33a3a07bf1184272ab1b Mon Sep 17 00:00:00 2001 From: liyuqian Date: Mon, 25 Mar 2019 17:09:39 -0700 Subject: [PATCH] Remove tranparent paint hack from BackdropFilter (#29929) We can remove the hack because https://github.com/flutter/engine/pull/8183 has been rolled into the framework. --- packages/flutter/lib/src/rendering/proxy_box.dart | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/packages/flutter/lib/src/rendering/proxy_box.dart b/packages/flutter/lib/src/rendering/proxy_box.dart index 3749868ad62..4062eb6af31 100644 --- a/packages/flutter/lib/src/rendering/proxy_box.dart +++ b/packages/flutter/lib/src/rendering/proxy_box.dart @@ -1033,20 +1033,11 @@ class RenderBackdropFilter extends RenderProxyBox { @override bool get alwaysNeedsCompositing => child != null; - // TODO(liyuqian): remove this after updating the engine BackdropFilterLayer. - void _addTrasnparentPaint(PaintingContext context, Offset offset) { - // Draw a fully transparent paint to make sure that the cull rect won't be - // shrunk by Skia. - final Paint transparentPaint = Paint()..color = const Color(0x00000000); - context.canvas.drawPaint(transparentPaint); - super.paint(context, offset); - } - @override void paint(PaintingContext context, Offset offset) { if (child != null) { assert(needsCompositing); - context.pushLayer(BackdropFilterLayer(filter: _filter), _addTrasnparentPaint, offset); + context.pushLayer(BackdropFilterLayer(filter: _filter), super.paint, offset); } } }