Apply antialiasing in calls to SkCanvas::clipRect (flutter/engine#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
This commit is contained in:
Jason Simmons
2017-08-10 13:23:35 -07:00
committed by GitHub
parent 2e8e755815
commit 89d9d751f9

View File

@@ -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) {