Skip to content

Commit

Permalink
Apply antialiasing in calls to SkCanvas::clipRect (flutter#3973)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
jason-simmons authored Aug 10, 2017
1 parent 941070f commit 06f6a98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/ui/painting/canvas.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 06f6a98

Please sign in to comment.