diff options
author | Robert Phillips <robertphillips@google.com> | 2018-05-11 16:11:45 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-05-14 12:01:59 +0000 |
commit | 5140f9a8e424985c4c354c40c41ca6b0a9b8772a (patch) | |
tree | 059552b642da7800f59886b593ec2391b5795ca1 /include/core/SkImageFilter.h | |
parent | b06a1eb4e5793b5053981cc76c72c497650c0e1a (diff) |
Minor refactoring to image filters
This pulls the boring parts out of: https://skia-review.googlesource.com/c/skia/+/127338 (Fix srcBounds computation in SkMatrixConvolutionImageFilter)
TBR=bsalomon@google.com
Change-Id: Iade788fcc96c4c16989d13e7592030a6a1d3f170
Reviewed-on: https://skia-review.googlesource.com/127573
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'include/core/SkImageFilter.h')
-rw-r--r-- | include/core/SkImageFilter.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 84389b4b5a..2528009e24 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -156,8 +156,7 @@ public: * implementation recursively unions all input bounds, or returns the * source rect if no inputs. */ - SkIRect filterBounds(const SkIRect& src, const SkMatrix& ctm, - MapDirection = kReverse_MapDirection) const; + SkIRect filterBounds(const SkIRect& src, const SkMatrix& ctm, MapDirection) const; #if SK_SUPPORT_GPU static sk_sp<SkSpecialImage> DrawWithFP(GrContext* context, @@ -332,7 +331,7 @@ protected: * Performs a forwards or reverse mapping of the given rect to accommodate * this filter's margin requirements. kForward_MapDirection is used to * determine the destination pixels which would be touched by filtering - * the given given source rect (e.g., given source bitmap bounds, + * the given source rect (e.g., given source bitmap bounds, * determine the optimal bounds of the filtered offscreen bitmap). * kReverse_MapDirection is used to determine which pixels of the * input(s) would be required to fill the given destination rect @@ -385,8 +384,8 @@ protected: * which are not capable of processing a smaller source bitmap into a * larger destination. */ - sk_sp<SkSpecialImage> applyCropRect(const Context&, SkSpecialImage* src, SkIPoint* srcOffset, - SkIRect* bounds) const; + sk_sp<SkSpecialImage> applyCropRectAndPad(const Context&, SkSpecialImage* src, + SkIPoint* srcOffset, SkIRect* bounds) const; /** * Creates a modified Context for use when recursing up the image filter DAG. |