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.
This commit is contained in:
@@ -1 +1 @@
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user