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

Unified Diff: src/effects/SkOffsetImageFilter.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/SkMorphologyImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkOffsetImageFilter.cpp
diff --git a/src/effects/SkOffsetImageFilter.cpp b/src/effects/SkOffsetImageFilter.cpp
index b7ded082d9c3b462471cbe5f9eeea05c9839b2eb..8a17ce34ec7b7c1320494e02e5db97ffb4dc91ad 100644
--- a/src/effects/SkOffsetImageFilter.cpp
+++ b/src/effects/SkOffsetImageFilter.cpp
@@ -108,3 +108,15 @@ SkOffsetImageFilter::SkOffsetImageFilter(SkScalar dx, SkScalar dy, SkImageFilter
: INHERITED(1, &input, cropRect, uniqueID) {
fOffset.set(dx, dy);
}
+
+#ifndef SK_IGNORE_TO_STRING
+void SkOffsetImageFilter::toString(SkString* str) const {
+ str->appendf("SkOffsetImageFilter: (");
+ str->appendf("offset: (%f, %f) ", fOffset.fX, fOffset.fY);
+ str->append("input: (");
+ if (this->getInput(0)) {
+ this->getInput(0)->toString(str);
+ }
+ str->append("))");
+}
+#endif
« no previous file with comments | « src/effects/SkMorphologyImageFilter.cpp ('k') | src/effects/SkPictureImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698