diff options
author | 2016-04-23 15:19:07 -0700 | |
---|---|---|
committer | 2016-04-23 15:19:07 -0700 | |
commit | bb34a8ac59850f128d9602e629a7475e3ad1a9d2 (patch) | |
tree | 007da1842b9b14bd7aff8dc73e0531fee9852a7d /include/core/SkImageFilter.h | |
parent | 36736a2dae94947e075ac9503d5de7799772a5f7 (diff) |
allow imagefilter to manage CTM decomposition
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1908173006
Review URL: https://codereview.chromium.org/1908173006
Diffstat (limited to 'include/core/SkImageFilter.h')
-rw-r--r-- | include/core/SkImageFilter.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h index 9758fde964..e2ec756b6c 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(); } + + /** * 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 |