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

Unified Diff: include/core/SkImageFilter.h

Issue 1915943002: simplify handle-affine: subclass overrides just describe their leaf behavior (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: early out if onCanHandleComplexCTM returns false Created 4 years, 8 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 | « no previous file | include/effects/SkColorFilterImageFilter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkImageFilter.h
diff --git a/include/core/SkImageFilter.h b/include/core/SkImageFilter.h
index e2ec756b6c6a25a3a7e7a5592841901db9f9893e..32a52d97fdca740547284eb10d12ac4a0277697b 100644
--- a/include/core/SkImageFilter.h
+++ b/include/core/SkImageFilter.h
@@ -220,7 +220,7 @@ public:
* 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(); }
+ bool canHandleComplexCTM() const;
/**
* Return an imagefilter which transforms its input by the given matrix.
@@ -349,7 +349,11 @@ protected:
return false;
}
- virtual bool onCanHandleAffine() const;
+ /**
+ * Override this to describe the behavior of your subclass - as a leaf node. The caller will
+ * take care of calling your inputs (and return false if any of them could not handle it).
+ */
+ virtual bool onCanHandleComplexCTM() const { return false; }
/** Given a "srcBounds" rect, computes destination bounds for this filter.
* "dstBounds" are computed by transforming the crop rect by the context's
« no previous file with comments | « no previous file | include/effects/SkColorFilterImageFilter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698