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

Unified Diff: src/effects/SkDisplacementMapEffect.cpp

Issue 789163006: Add toString methods to SkImageFilter-derived classes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Make sure leading 0's aren't stripped off colors Created 6 years 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 | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkDisplacementMapEffect.cpp
diff --git a/src/effects/SkDisplacementMapEffect.cpp b/src/effects/SkDisplacementMapEffect.cpp
index b1f6a97e7147ac4e84f58bca0b584974f62347c4..2c7f5ee8cee5b9e71217a886d10af662cbbaf3fb 100644
--- a/src/effects/SkDisplacementMapEffect.cpp
+++ b/src/effects/SkDisplacementMapEffect.cpp
@@ -281,6 +281,22 @@ bool SkDisplacementMapEffect::onFilterBounds(const SkIRect& src, const SkMatrix&
return true;
}
+#ifndef SK_IGNORE_TO_STRING
+void SkDisplacementMapEffect::toString(SkString* str) const {
+ str->appendf("SkDisplacementMapEffect: (");
+ str->appendf("scale: %f ", fScale);
+ str->appendf("displacement: (");
+ if (this->getDisplacementInput()) {
+ this->getDisplacementInput()->toString(str);
+ }
+ str->appendf(") color: (");
+ if (this->getColorInput()) {
+ this->getColorInput()->toString(str);
+ }
+ str->appendf("))");
+}
+#endif
+
///////////////////////////////////////////////////////////////////////////////
#if SK_SUPPORT_GPU
@@ -620,3 +636,4 @@ void GrGLDisplacementMapEffect::GenKey(const GrProcessor& proc,
b->add32(xKey | yKey);
}
#endif
+
« no previous file with comments | « src/effects/SkComposeImageFilter.cpp ('k') | src/effects/SkDropShadowImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698