Unverified Commit 42443f66 authored by liyuqian's avatar liyuqian Committed by GitHub

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.
parent 18a08a8f
......@@ -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);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment