Index: src/gpu/SkGpuDevice.cpp |
diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
index eaac5ab12c0a50264b65689c2f7d6701f1d5b662..c8615bac8b14458cfabce047edf64e18d34f6c58 100644 |
--- a/src/gpu/SkGpuDevice.cpp |
+++ b/src/gpu/SkGpuDevice.cpp |
@@ -1387,7 +1387,7 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, |
SkAutoCachedTexture act(this, bitmap, NULL, &texture); |
SkImageFilter* filter = paint.getImageFilter(); |
- SkIPoint offset = SkIPoint::Make(0, 0); |
+ SkIPoint offset = SkIPoint::Make(left, top); |
// This bitmap will own the filtered result as a texture. |
SkBitmap filteredBitmap; |
@@ -1407,12 +1407,12 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, |
} |
fContext->drawRectToRect(grPaint, |
- SkRect::MakeXYWH(SkIntToScalar(left), |
- SkIntToScalar(top), |
- SkIntToScalar(w), |
- SkIntToScalar(h)), |
SkRect::MakeXYWH(SkIntToScalar(offset.fX), |
SkIntToScalar(offset.fY), |
+ SkIntToScalar(w), |
+ SkIntToScalar(h)), |
+ SkRect::MakeXYWH(0, |
+ 0, |
SK_Scalar1 * w / texture->width(), |
SK_Scalar1 * h / texture->height())); |
} |