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

Unified Diff: src/effects/SkColorFilterImageFilter.cpp

Issue 1908173006: allow imagefilter to manage CTM decomposition (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: switch to simple canHandleAffine pattern 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
Index: src/effects/SkColorFilterImageFilter.cpp
diff --git a/src/effects/SkColorFilterImageFilter.cpp b/src/effects/SkColorFilterImageFilter.cpp
index 8d412cc2f5579967e9d304c443183f5b5855ae7b..7a2f4cc2abf65374b571980b74ade8eb14895284 100644
--- a/src/effects/SkColorFilterImageFilter.cpp
+++ b/src/effects/SkColorFilterImageFilter.cpp
@@ -126,6 +126,12 @@ bool SkColorFilterImageFilter::onIsColorFilterNode(SkColorFilter** filter) const
return false;
}
+bool SkColorFilterImageFilter::onCanHandleAffine() const {
+ SkASSERT(1 == this->countInputs());
+ SkImageFilter* input = this->getInput(0);
+ return !input || input->canHandleAffine();
+}
+
bool SkColorFilterImageFilter::affectsTransparentBlack() const {
return fColorFilter->affectsTransparentBlack();
}

Powered by Google App Engine
This is Rietveld 408576698