skip very large rects (for now) until we can pre-clip them to avoid floating
point precision errors. git-svn-id: http://skia.googlecode.com/svn/trunk@6497 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
f11cf9ff88
commit
07784a0419
@ -140,6 +140,10 @@ static bool drawRectsIntoMask(const SkRect rects[], int count, SkMask* mask) {
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool rect_coordinates_exceed(const SkRect& r, SkScalar v) {
|
||||
return r.fLeft < -v || r.fTop < -v || r.fRight > v || r.fBottom > v;
|
||||
}
|
||||
|
||||
SkMaskFilter::FilterReturn
|
||||
SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
|
||||
const SkMatrix& matrix,
|
||||
@ -148,7 +152,13 @@ SkBlurMaskFilterImpl::filterRectsToNine(const SkRect rects[], int count,
|
||||
if (count < 1 || count > 2) {
|
||||
return kUnimplemented_FilterReturn;
|
||||
}
|
||||
|
||||
|
||||
// TODO: take clipBounds into account to limit our coordinates up front
|
||||
// for now, just skip too-large src rects (to take the old code path).
|
||||
if (rect_coordinates_exceed(rects[0], SkIntToScalar(32767))) {
|
||||
return kUnimplemented_FilterReturn;
|
||||
}
|
||||
|
||||
SkIPoint margin;
|
||||
SkMask srcM, dstM;
|
||||
rects[0].roundOut(&srcM.fBounds);
|
||||
|
Loading…
Reference in New Issue
Block a user