Index: src/core/SkImageFilter.cpp |
diff --git a/src/core/SkImageFilter.cpp b/src/core/SkImageFilter.cpp |
index 43adc2fad5b8303c39febd9839b40dfa0dca2fcb..3f6ea9a12becd54e339ffa15970a7f421bc9d2f9 100644 |
--- a/src/core/SkImageFilter.cpp |
+++ b/src/core/SkImageFilter.cpp |
@@ -440,9 +440,11 @@ SkImageFilter* SkImageFilter::CreateMatrixFilter(const SkMatrix& matrix, |
return SkMatrixImageFilter::Create(matrix, filterQuality, input); |
} |
-SkImageFilter* SkImageFilter::CreateLocalMatrixFilter(const SkMatrix& matrix, |
- SkImageFilter* input) { |
- return SkLocalMatrixImageFilter::Create(matrix, input); |
+SkImageFilter* SkImageFilter::newWithLocalMatrix(const SkMatrix& matrix) const { |
+ // SkLocalMatrixImageFilter takes SkImage* in its factory, but logically that parameter |
+ // is *always* treated as a const ptr. Hence the const-cast here. |
+ // |
+ return SkLocalMatrixImageFilter::Create(matrix, const_cast<SkImageFilter*>(this)); |
} |
#if SK_SUPPORT_GPU |