Unverified Commit 28ba95ab authored by Gary Qian's avatar Gary Qian Committed by GitHub

Default clipBehavior of ClipRect to hardEdge. (#21703)

Previously, the engine did not properly pass the AA flag on ClipRect.clipBehavior. flutter/engine#6199 fixes this and enables AA. However, default AA on clipRects has caused severe regressions in benchmark performance.

To maintain expected performance, we should now default the clipBehavior to hardEdge to disable default AA. This is consistent with any flutter projects that did not previously explicitly set the clipBehavior and should not change app appearance.
parent d61b48b7
73aaafada280dbc726c6bfab510dd7b46fc7e3be
da68caa0a261663858998e047c02560e94404e7a
......@@ -496,7 +496,7 @@ class ClipRect extends SingleChildRenderObjectWidget {
///
/// If [clipper] is null, the clip will match the layout size and position of
/// the child.
const ClipRect({ Key key, this.clipper, this.clipBehavior = Clip.antiAlias, Widget child }) : super(key: key, child: child);
const ClipRect({ Key key, this.clipper, this.clipBehavior = Clip.hardEdge, Widget child }) : super(key: key, child: child);
/// If non-null, determines which clip to use.
final CustomClipper<Rect> clipper;
......
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