From 06f6a987069549ba6e8a0bc7b4924cdfc36a1374 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 10 Aug 2017 13:23:35 -0700 Subject: [PATCH] Apply antialiasing in calls to SkCanvas::clipRect (#3973) Without this, the cull rect calculated by an SkPicture may be truncated to integer pixel coordinates. The raster cache relies on a precise cull rect in logical coordinates. See https://bugs.chromium.org/p/skia/issues/detail?id=6954 --- lib/ui/painting/canvas.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ui/painting/canvas.cc b/lib/ui/painting/canvas.cc index ea9810afc5868..84b5cfd1924d4 100644 --- a/lib/ui/painting/canvas.cc +++ b/lib/ui/painting/canvas.cc @@ -157,7 +157,7 @@ void Canvas::transform(const tonic::Float64List& matrix4) { void Canvas::clipRect(double left, double top, double right, double bottom) { if (!canvas_) return; - canvas_->clipRect(SkRect::MakeLTRB(left, top, right, bottom)); + canvas_->clipRect(SkRect::MakeLTRB(left, top, right, bottom), SkClipOp::kIntersect, true); } void Canvas::clipRRect(const RRect& rrect) {