Chromium Code Reviews| Index: src/gpu/SkGpuDevice.cpp |
| diff --git a/src/gpu/SkGpuDevice.cpp b/src/gpu/SkGpuDevice.cpp |
| index 17e4468acb21f293b1e3ba87945a8b48d57619df..45f51097f47b23d96e0570bf90f7d307d7ef7c4b 100644 |
| --- a/src/gpu/SkGpuDevice.cpp |
| +++ b/src/gpu/SkGpuDevice.cpp |
| @@ -1163,7 +1163,8 @@ void SkGpuDevice::drawSprite(const SkDraw& draw, const SkBitmap& bitmap, |
| SkIPoint offset = SkIPoint::Make(0, 0); |
| SkMatrix matrix(*draw.fMatrix); |
| matrix.postTranslate(SkIntToScalar(-left), SkIntToScalar(-top)); |
| - SkIRect clipBounds = SkIRect::MakeWH(bitmap.width(), bitmap.height()); |
| + SkIRect clipBounds = draw.fClip->getBounds(); |
|
reed1
2015/12/07 20:26:20
option: could use (your pref)
SkIRect clipBounds
Stephen White
2015/12/07 21:34:23
Good idea! Done.
|
| + clipBounds.offset(-left, -top); |
| SkAutoTUnref<SkImageFilter::Cache> cache(getImageFilterCache()); |
| // This cache is transient, and is freed (along with all its contained |
| // textures) when it goes out of scope. |
| @@ -1326,7 +1327,8 @@ void SkGpuDevice::drawDevice(const SkDraw& draw, SkBaseDevice* device, |
| SkIPoint offset = SkIPoint::Make(0, 0); |
| SkMatrix matrix(*draw.fMatrix); |
| matrix.postTranslate(SkIntToScalar(-x), SkIntToScalar(-y)); |
| - SkIRect clipBounds = SkIRect::MakeWH(devTex->width(), devTex->height()); |
| + SkIRect clipBounds = draw.fClip->getBounds(); |
| + clipBounds.offset(-x, -y); |
| // This cache is transient, and is freed (along with all its contained |
| // textures) when it goes out of scope. |
| SkAutoTUnref<SkImageFilter::Cache> cache(getImageFilterCache()); |