Add a comment to explain clip intersection in crop rects.
BUG=skia: R=robertphillips Review URL: https://codereview.chromium.org/1401973003
This commit is contained in:
parent
f469fc0e0f
commit
74ec8d47b5
@ -87,6 +87,11 @@ bool SkImageFilter::CropRect::applyTo(const SkIRect& imageBounds, const Context&
|
|||||||
cropped->fBottom = cropped->fTop + devICropR.height();
|
cropped->fBottom = cropped->fTop + devICropR.height();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Intersect against the clip bounds, in case the crop rect has
|
||||||
|
// grown the bounds beyond the original clip. This can happen for
|
||||||
|
// example in tiling, where the clip is much smaller than the filtered
|
||||||
|
// primitive. If we didn't do this, we would be processing the filter
|
||||||
|
// at the full crop rect size in every tile.
|
||||||
return cropped->intersect(ctx.clipBounds());
|
return cropped->intersect(ctx.clipBounds());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user