Index: src/core/SkDevice.cpp |
diff --git a/src/core/SkDevice.cpp b/src/core/SkDevice.cpp |
index cf4a279b355523be1a982af8a989e014beaf7938..222218713dd0f603a1ec6669f5c367ec41540aa5 100644 |
--- a/src/core/SkDevice.cpp |
+++ b/src/core/SkDevice.cpp |
@@ -411,7 +411,8 @@ void SkBaseDevice::drawBitmapAsSprite(const SkDraw& draw, const SkBitmap& bitmap |
SkIPoint offset = SkIPoint::Make(0, 0); |
SkMatrix matrix = *draw.fMatrix; |
matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y)); |
- const SkIRect clipBounds = bitmap.bounds(); |
+ SkIRect clipBounds = draw.fClip->getBounds(); |
+ clipBounds.offset(-x, -y); |
SkAutoTUnref<SkImageFilter::Cache> cache(this->getImageFilterCache()); |
SkImageFilter::Context ctx(matrix, clipBounds, cache.get(), |
SkImageFilter::kApprox_SizeConstraint); |