| Index: src/effects/SkMatrixConvolutionImageFilter.cpp
|
| diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp
|
| index 7c5dd8368f439e528ca06691d3f9ff3bb9273ad0..a1f23f7a290b8b0837fd3ca1efc7f9e02a48cd1c 100644
|
| --- a/src/effects/SkMatrixConvolutionImageFilter.cpp
|
| +++ b/src/effects/SkMatrixConvolutionImageFilter.cpp
|
| @@ -280,7 +280,7 @@ bool SkMatrixConvolutionImageFilter::onFilterImage(Proxy* proxy,
|
| }
|
|
|
| SkIRect bounds;
|
| - if (!this->applyCropRect(ctx, proxy, src, &srcOffset, &bounds, &src)) {
|
| + if (!this->applyCropRect(this->mapContext(ctx), proxy, src, &srcOffset, &bounds, &src)) {
|
| return false;
|
| }
|
|
|
| @@ -322,17 +322,17 @@ bool SkMatrixConvolutionImageFilter::onFilterImage(Proxy* proxy,
|
| return true;
|
| }
|
|
|
| -bool SkMatrixConvolutionImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& ctm,
|
| - SkIRect* dst) const {
|
| - SkIRect bounds = src;
|
| - bounds.fRight += fKernelSize.width() - 1;
|
| - bounds.fBottom += fKernelSize.height() - 1;
|
| - bounds.offset(-fKernelOffset);
|
| - if (getInput(0) && !getInput(0)->filterBounds(bounds, ctm, &bounds)) {
|
| - return false;
|
| +void SkMatrixConvolutionImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm,
|
| + SkIRect* dst, MapDirection direction) const {
|
| + *dst = src;
|
| + int w = fKernelSize.width() - 1, h = fKernelSize.height() - 1;
|
| + dst->fRight += w;
|
| + dst->fBottom += h;
|
| + if (kReverse_MapDirection == direction) {
|
| + dst->offset(-fKernelOffset);
|
| + } else {
|
| + dst->offset(fKernelOffset - SkIPoint::Make(w, h));
|
| }
|
| - *dst = bounds;
|
| - return true;
|
| }
|
|
|
| bool SkMatrixConvolutionImageFilter::canComputeFastBounds() const {
|
|
|