Clamp negative sigma to 0 in SkDropShadowImageFilter.
This can occur when the matrix includes a perspective transform. BUG=skia:2094 R=bsalomon@google.com Review URL: https://codereview.chromium.org/137833004 git-svn-id: http://skia.googlecode.com/svn/trunk@13220 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
c1587f94a7
commit
74bdde0d50
@ -79,6 +79,8 @@ bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source
|
||||
|
||||
SkVector sigma, localSigma = SkVector::Make(fSigmaX, fSigmaY);
|
||||
matrix.mapVectors(&sigma, &localSigma, 1);
|
||||
sigma.fX = SkMaxScalar(0, sigma.fX);
|
||||
sigma.fY = SkMaxScalar(0, sigma.fY);
|
||||
SkAutoTUnref<SkImageFilter> blurFilter(new SkBlurImageFilter(sigma.fX, sigma.fY));
|
||||
SkAutoTUnref<SkColorFilter> colorFilter(SkColorFilter::CreateModeFilter(fColor, SkXfermode::kSrcIn_Mode));
|
||||
SkPaint paint;
|
||||
|
Loading…
Reference in New Issue
Block a user