| Index: src/core/SkCanvas.cpp
|
| diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
|
| index 3880fa9d733f1cd843a67829ca7099b63d585d87..0c9c20d1eed231c1ac72d8d0cfeb8e1886e759d4 100644
|
| --- a/src/core/SkCanvas.cpp
|
| +++ b/src/core/SkCanvas.cpp
|
| @@ -40,8 +40,6 @@
|
| #include "GrRenderTarget.h"
|
| #endif
|
|
|
| -#define SK_SUPPORT_SRC_BOUNDS_BLOAT_FOR_IMAGEFILTERS
|
| -
|
| /*
|
| * Return true if the drawing this rect would hit every pixels in the canvas.
|
| *
|
| @@ -1084,6 +1082,10 @@ bool SkCanvas::clipRectBounds(const SkRect* bounds, SaveFlags flags,
|
| } else {
|
| bounds = nullptr;
|
| }
|
| +#else
|
| + if (bounds && !imageFilter->canComputeFastBounds()) {
|
| + bounds = nullptr;
|
| + }
|
| #endif
|
| }
|
| SkIRect ir;
|
| @@ -1370,7 +1372,11 @@ void SkCanvas::internalDrawDevice(SkBaseDevice* srcDev, int x, int y,
|
| const SkBitmap& src = srcDev->accessBitmap(false);
|
| SkMatrix matrix = *iter.fMatrix;
|
| matrix.postTranslate(SkIntToScalar(-pos.x()), SkIntToScalar(-pos.y()));
|
| +#ifdef SK_SUPPORT_SRC_BOUNDS_BLOAT_FOR_IMAGEFILTERS
|
| SkIRect clipBounds = SkIRect::MakeWH(srcDev->width(), srcDev->height());
|
| +#else
|
| + SkIRect clipBounds = iter.fClip->getBounds().makeOffset(-pos.x(), -pos.y());
|
| +#endif
|
| SkAutoTUnref<SkImageFilter::Cache> cache(dstDev->getImageFilterCache());
|
| SkImageFilter::Context ctx(matrix, clipBounds, cache.get(),
|
| SkImageFilter::kApprox_SizeConstraint);
|
|
|