Index: src/effects/SkDropShadowImageFilter.cpp |
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp |
index 60294e4f027a8ca91fe891b98715782c9ff903b4..61093784faf0b2ad915c7048149822bac481882c 100644 |
--- a/src/effects/SkDropShadowImageFilter.cpp |
+++ b/src/effects/SkDropShadowImageFilter.cpp |
@@ -77,14 +77,18 @@ bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source |
} |
SkCanvas canvas(device.get()); |
- SkAutoTUnref<SkImageFilter> blurFilter(new SkBlurImageFilter(fSigmaX, fSigmaY)); |
+ SkVector sigma, localSigma = SkVector::Make(fSigmaX, fSigmaY); |
+ matrix.mapVectors(&sigma, &localSigma, 1); |
+ SkAutoTUnref<SkImageFilter> blurFilter(new SkBlurImageFilter(sigma.fX, sigma.fY)); |
SkAutoTUnref<SkColorFilter> colorFilter(SkColorFilter::CreateModeFilter(fColor, SkXfermode::kSrcIn_Mode)); |
SkPaint paint; |
paint.setImageFilter(blurFilter.get()); |
paint.setColorFilter(colorFilter.get()); |
paint.setXfermodeMode(SkXfermode::kSrcOver_Mode); |
+ SkVector offsetVec, localOffsetVec = SkVector::Make(fDx, fDy); |
+ matrix.mapVectors(&offsetVec, &localOffsetVec, 1); |
canvas.translate(-SkIntToScalar(bounds.fLeft), -SkIntToScalar(bounds.fTop)); |
- canvas.drawBitmap(src, fDx, fDy, &paint); |
+ canvas.drawBitmap(src, offsetVec.fX, offsetVec.fY, &paint); |
canvas.drawBitmap(src, 0, 0); |
*result = device->accessBitmap(false); |
offset->fX = bounds.fLeft; |