Commit 5af922ed authored by Adam Barth's avatar Adam Barth Committed by GitHub

Use antialiased clips (#6298)

The Skia team tells us that these go faster.
parent 38840776
...@@ -194,7 +194,7 @@ class PaintingContext { ...@@ -194,7 +194,7 @@ class PaintingContext {
_canvas = null; _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 /// Hints that the painting in the current layer is complex and would benefit
/// from caching. /// from caching.
...@@ -280,7 +280,7 @@ class PaintingContext { ...@@ -280,7 +280,7 @@ class PaintingContext {
painter(childContext, offset); painter(childContext, offset);
childContext._stopRecordingIfNeeded(); childContext._stopRecordingIfNeeded();
} else { } else {
canvas.saveLayer(offsetBounds, _disableAntialias); canvas.saveLayer(offsetBounds, _defaultPaint);
canvas.clipRRect(offsetClipRRect); canvas.clipRRect(offsetClipRRect);
painter(this, offset); painter(this, offset);
canvas.restore(); canvas.restore();
...@@ -310,7 +310,7 @@ class PaintingContext { ...@@ -310,7 +310,7 @@ class PaintingContext {
painter(childContext, offset); painter(childContext, offset);
childContext._stopRecordingIfNeeded(); childContext._stopRecordingIfNeeded();
} else { } else {
canvas.saveLayer(bounds.shift(offset), _disableAntialias); canvas.saveLayer(bounds.shift(offset), _defaultPaint);
canvas.clipPath(clipPath.shift(offset)); canvas.clipPath(clipPath.shift(offset));
painter(this, offset); painter(this, offset);
canvas.restore(); canvas.restore();
......
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