From 94dd7a52d3fe0632cd830f2e9cd14103c2726aac Mon Sep 17 00:00:00 2001 From: reed Date: Wed, 14 Oct 2015 07:49:35 -0700 Subject: change back to method for localmatrix imagefilter This method is different from MatrixFilter, in that MatrixFilter does not require a pre-existing filter, but LocalM does. Also change the comment to be more general, as there is no promise that we return a different subclass, and certainly not a specific subclass. This pattern of obj->newWithModifiers() also more closely matches the pattern in SkImage (newSubset). BUG=skia: Review URL: https://codereview.chromium.org/1402133002 --- include/core/SkImageFilter.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'include') diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 0a3f7b8492..3a7cb23d5e 100644 --- a/include/core/SkImageFilter.h +++ b/include/core/SkImageFilter.h @@ -229,6 +229,12 @@ public: // Can this filter DAG compute the resulting bounds of an object-space rectangle? bool canComputeFastBounds() const; + /** + * If this filter can be represented by another filter + a localMatrix, return that filter, + * else return null. + */ + SkImageFilter* newWithLocalMatrix(const SkMatrix& matrix) const; + /** * Create an SkMatrixImageFilter, which transforms its input by the given matrix. */ @@ -236,13 +242,6 @@ public: SkFilterQuality, SkImageFilter* input = NULL); - /** - * Create an SkLocalMatrixImageFilter, which transform the filter parameters - * of its inputs by the given matrix. - */ - static SkImageFilter* CreateLocalMatrixFilter(const SkMatrix& matrix, - SkImageFilter* input); - #if SK_SUPPORT_GPU /** * Wrap the given texture in a texture-backed SkBitmap. -- cgit v1.2.3