mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
Missing default hardEdge clip for ClipRectLayer (#21826)
In my local tests, this should finally fix https://github.com/flutter/flutter/issues/21617
This commit is contained in:
parent
9bf8502fef
commit
069cddaa67
@ -1 +1 @@
|
||||
da68caa0a261663858998e047c02560e94404e7a
|
||||
96ed11be7a52f9b8ace5af0a286d8d4415dbd78b
|
||||
|
@ -622,7 +622,7 @@ class ClipRectLayer extends ContainerLayer {
|
||||
///
|
||||
/// The [clipRect] property must be non-null before the compositing phase of
|
||||
/// the pipeline.
|
||||
ClipRectLayer({ this.clipRect, Clip clipBehavior = Clip.antiAlias }) :
|
||||
ClipRectLayer({ this.clipRect, Clip clipBehavior = Clip.hardEdge }) :
|
||||
_clipBehavior = clipBehavior, assert(clipBehavior != null), assert(clipBehavior != Clip.none);
|
||||
|
||||
/// The rectangle to clip in the parent's coordinate system.
|
||||
|
@ -385,7 +385,7 @@ class PaintingContext extends ClipContext {
|
||||
/// * `painter` is a callback that will paint with the [clipRect] applied. This
|
||||
/// function calls the [painter] synchronously.
|
||||
/// * `clipBehavior` controls how the rectangle is clipped.
|
||||
void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.antiAlias}) {
|
||||
void pushClipRect(bool needsCompositing, Offset offset, Rect clipRect, PaintingContextCallback painter, {Clip clipBehavior = Clip.hardEdge}) {
|
||||
final Rect offsetClipRect = clipRect.shift(offset);
|
||||
if (needsCompositing) {
|
||||
pushLayer(ClipRectLayer(clipRect: offsetClipRect, clipBehavior: clipBehavior), painter, offset, childPaintBounds: offsetClipRect);
|
||||
|
Loading…
Reference in New Issue
Block a user