From 5af922edb0d685694fe783c8c777d7193082bd1d Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Wed, 12 Oct 2016 18:27:40 -0700 Subject: [PATCH] Use antialiased clips (#6298) The Skia team tells us that these go faster. --- packages/flutter/lib/src/rendering/object.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/flutter/lib/src/rendering/object.dart b/packages/flutter/lib/src/rendering/object.dart index e36db3e25b..4e64c0099d 100644 --- a/packages/flutter/lib/src/rendering/object.dart +++ b/packages/flutter/lib/src/rendering/object.dart @@ -194,7 +194,7 @@ class PaintingContext { _canvas = null; } - static final Paint _disableAntialias = new Paint()..isAntiAlias = false; + static final Paint _defaultPaint = new Paint(); /// Hints that the painting in the current layer is complex and would benefit /// from caching. @@ -280,7 +280,7 @@ class PaintingContext { painter(childContext, offset); childContext._stopRecordingIfNeeded(); } else { - canvas.saveLayer(offsetBounds, _disableAntialias); + canvas.saveLayer(offsetBounds, _defaultPaint); canvas.clipRRect(offsetClipRRect); painter(this, offset); canvas.restore(); @@ -310,7 +310,7 @@ class PaintingContext { painter(childContext, offset); childContext._stopRecordingIfNeeded(); } else { - canvas.saveLayer(bounds.shift(offset), _disableAntialias); + canvas.saveLayer(bounds.shift(offset), _defaultPaint); canvas.clipPath(clipPath.shift(offset)); painter(this, offset); canvas.restore();