Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Unified Diff: include/effects/SkMatrixConvolutionImageFilter.h

Issue 27471002: Implement crop rect support for SkMatrixConvolutionImageFilter. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Fix style issue Created 7 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/effects/SkMagnifierImageFilter.h ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/effects/SkMatrixConvolutionImageFilter.h
diff --git a/include/effects/SkMatrixConvolutionImageFilter.h b/include/effects/SkMatrixConvolutionImageFilter.h
index b2602fe6f889c46ec9222b83f9ff370b7afc2b26..d3cf8e34fccf7381c47da54758303f3ed4471b6c 100644
--- a/include/effects/SkMatrixConvolutionImageFilter.h
+++ b/include/effects/SkMatrixConvolutionImageFilter.h
@@ -47,9 +47,18 @@ public:
alpha is copied from the source image.
@param input The input image filter. If NULL, the src bitmap
passed to filterImage() is used instead.
+ @param cropRect The rectangle to which the output processing will be limited.
*/
- SkMatrixConvolutionImageFilter(const SkISize& kernelSize, const SkScalar* kernel, SkScalar gain, SkScalar bias, const SkIPoint& target, TileMode tileMode, bool convolveAlpha, SkImageFilter* input = NULL);
+ SkMatrixConvolutionImageFilter(const SkISize& kernelSize,
+ const SkScalar* kernel,
+ SkScalar gain,
+ SkScalar bias,
+ const SkIPoint& target,
+ TileMode tileMode,
+ bool convolveAlpha,
+ SkImageFilter* input = NULL,
+ const CropRect* cropRect = NULL);
virtual ~SkMatrixConvolutionImageFilter();
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkMatrixConvolutionImageFilter)
@@ -62,7 +71,10 @@ protected:
SkBitmap* result, SkIPoint* loc) SK_OVERRIDE;
#if SK_SUPPORT_GPU
- virtual bool asNewEffect(GrEffectRef** effect, GrTexture*, const SkMatrix& matrix) const SK_OVERRIDE;
+ virtual bool asNewEffect(GrEffectRef** effect,
+ GrTexture*,
+ const SkMatrix& matrix,
+ const SkIRect& bounds) const SK_OVERRIDE;
#endif
private:
@@ -76,11 +88,23 @@ private:
typedef SkImageFilter INHERITED;
template <class PixelFetcher, bool convolveAlpha>
- void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect);
+ void filterPixels(const SkBitmap& src,
+ SkBitmap* result,
+ const SkIRect& rect,
+ const SkIRect& bounds);
template <class PixelFetcher>
- void filterPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect);
- void filterInteriorPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect);
- void filterBorderPixels(const SkBitmap& src, SkBitmap* result, const SkIRect& rect);
+ void filterPixels(const SkBitmap& src,
+ SkBitmap* result,
+ const SkIRect& rect,
+ const SkIRect& bounds);
+ void filterInteriorPixels(const SkBitmap& src,
+ SkBitmap* result,
+ const SkIRect& rect,
+ const SkIRect& bounds);
+ void filterBorderPixels(const SkBitmap& src,
+ SkBitmap* result,
+ const SkIRect& rect,
+ const SkIRect& bounds);
};
#endif
« no previous file with comments | « include/effects/SkMagnifierImageFilter.h ('k') | src/core/SkImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698