diff options
Diffstat (limited to 'effects/SkMatrixConvolutionImageFilter.cpp')
-rw-r--r-- | effects/SkMatrixConvolutionImageFilter.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/effects/SkMatrixConvolutionImageFilter.cpp b/effects/SkMatrixConvolutionImageFilter.cpp index 878cbae7..3c9fc877 100644 --- a/effects/SkMatrixConvolutionImageFilter.cpp +++ b/effects/SkMatrixConvolutionImageFilter.cpp @@ -306,6 +306,19 @@ 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; + } + *dst = bounds; + return true; +} + #if SK_SUPPORT_GPU /////////////////////////////////////////////////////////////////////////////// |