Index: include/core/SkImageFilter.h |
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h |
index 9758fde9645cffb2254f2994925daab55507baaf..e2ec756b6c6a25a3a7e7a5592841901db9f9893e 100644 |
--- a/include/core/SkImageFilter.h |
+++ b/include/core/SkImageFilter.h |
@@ -216,6 +216,13 @@ public: |
#endif |
/** |
+ * ImageFilters can natively handle scaling and translate components in the CTM. Only some of |
+ * them can handle affine (or more complex) matrices. This call returns true iff the filter |
+ * and all of its (non-null) inputs can handle these more complex matrices. |
+ */ |
+ bool canHandleAffine() const { return this->onCanHandleAffine(); } |
Stephen White
2016/04/25 14:09:34
<bikeshed> Could we add a noun to that? canHandleA
|
+ |
+ /** |
* Return an imagefilter which transforms its input by the given matrix. |
*/ |
static sk_sp<SkImageFilter> MakeMatrixFilter(const SkMatrix& matrix, |
@@ -342,6 +349,8 @@ protected: |
return false; |
} |
+ virtual bool onCanHandleAffine() const; |
+ |
/** Given a "srcBounds" rect, computes destination bounds for this filter. |
* "dstBounds" are computed by transforming the crop rect by the context's |
* CTM, applying it to the initial bounds, and intersecting the result with |