aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkMatrixImageFilter.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-05-17 11:17:39 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-05-17 17:06:24 +0000
commit120784394c160d009bc3aa88dd217c13c105a6ca (patch)
treec2f3406ff37360a511af362138938e754c057619 /src/core/SkMatrixImageFilter.cpp
parentffb3d688b0e76ad7d1517657b00e4525cc603f40 (diff)
Fix srcBounds computation in SkMatrixConvolutionImageFilter
Note that this does change the behavior of the cropRect for the repeated case. The cropRect now only acts as a hard clip on the output. BUG= skia:7766 Change-Id: I1d66678bc797cd4835701cd20c36e68b22ac880a Reviewed-on: https://skia-review.googlesource.com/127338 Reviewed-by: Herb Derby <herb@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src/core/SkMatrixImageFilter.cpp')
-rw-r--r--src/core/SkMatrixImageFilter.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/SkMatrixImageFilter.cpp b/src/core/SkMatrixImageFilter.cpp
index f9b53348b1..47b0d4245e 100644
--- a/src/core/SkMatrixImageFilter.cpp
+++ b/src/core/SkMatrixImageFilter.cpp
@@ -114,12 +114,12 @@ SkRect SkMatrixImageFilter::computeFastBounds(const SkRect& src) const {
}
SkIRect SkMatrixImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm,
- MapDirection direction) const {
+ MapDirection dir, const SkIRect* inputRect) const {
SkMatrix matrix;
if (!ctm.invert(&matrix)) {
return src;
}
- if (kForward_MapDirection == direction) {
+ if (kForward_MapDirection == dir) {
matrix.postConcat(fTransform);
} else {
SkMatrix transformInverse;
@@ -134,7 +134,7 @@ SkIRect SkMatrixImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatr
SkIRect result = floatBounds.roundOut();
#ifndef SK_IGNORE_MATRIX_IMAGE_FILTER_FIX
- if (kReverse_MapDirection == direction && kNone_SkFilterQuality != fFilterQuality) {
+ if (kReverse_MapDirection == dir && kNone_SkFilterQuality != fFilterQuality) {
// When filtering we might need some pixels in the source that might be otherwise
// clipped off.
result.outset(1, 1);