Index: src/effects/SkDropShadowImageFilter.cpp |
diff --git a/src/effects/SkDropShadowImageFilter.cpp b/src/effects/SkDropShadowImageFilter.cpp |
index 7c9631c3935ebcfaabe53dc52ff9d32a4af4ce88..94055ce8ae0a44281560d86f8bf54df36e89cb2d 100644 |
--- a/src/effects/SkDropShadowImageFilter.cpp |
+++ b/src/effects/SkDropShadowImageFilter.cpp |
@@ -58,17 +58,17 @@ void SkDropShadowImageFilter::flatten(SkWriteBuffer& buffer) const |
buffer.writeColor(fColor); |
} |
-bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source, const SkMatrix& matrix, SkBitmap* result, SkIPoint* offset) const |
+bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source, const Context& ctx, SkBitmap* result, SkIPoint* offset) const |
{ |
SkBitmap src = source; |
SkIPoint srcOffset = SkIPoint::Make(0, 0); |
- if (getInput(0) && !getInput(0)->filterImage(proxy, source, matrix, &src, &srcOffset)) |
+ if (getInput(0) && !getInput(0)->filterImage(proxy, source, ctx, &src, &srcOffset)) |
return false; |
SkIRect bounds; |
src.getBounds(&bounds); |
bounds.offset(srcOffset); |
- if (!this->applyCropRect(&bounds, matrix)) { |
+ if (!this->applyCropRect(&bounds, ctx.ctm())) { |
return false; |
} |
@@ -79,7 +79,7 @@ bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source |
SkCanvas canvas(device.get()); |
SkVector sigma, localSigma = SkVector::Make(fSigmaX, fSigmaY); |
- matrix.mapVectors(&sigma, &localSigma, 1); |
+ ctx.ctm().mapVectors(&sigma, &localSigma, 1); |
sigma.fX = SkMaxScalar(0, sigma.fX); |
sigma.fY = SkMaxScalar(0, sigma.fY); |
SkAutoTUnref<SkImageFilter> blurFilter(SkBlurImageFilter::Create(sigma.fX, sigma.fY)); |
@@ -89,7 +89,7 @@ bool SkDropShadowImageFilter::onFilterImage(Proxy* proxy, const SkBitmap& source |
paint.setColorFilter(colorFilter.get()); |
paint.setXfermodeMode(SkXfermode::kSrcOver_Mode); |
SkVector offsetVec, localOffsetVec = SkVector::Make(fDx, fDy); |
- matrix.mapVectors(&offsetVec, &localOffsetVec, 1); |
+ ctx.ctm().mapVectors(&offsetVec, &localOffsetVec, 1); |
canvas.translate(-SkIntToScalar(bounds.fLeft), -SkIntToScalar(bounds.fTop)); |
canvas.drawBitmap(src, offsetVec.fX, offsetVec.fY, &paint); |
canvas.drawBitmap(src, 0, 0); |