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

Unified Diff: gm/imagefiltersbase.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 | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gm/imagefiltersbase.cpp
diff --git a/gm/imagefiltersbase.cpp b/gm/imagefiltersbase.cpp
index 749334a61ea28154aa86e27be25895252fb244c7..be8d402528272646b2c5b7cb447e140161517ef8 100644
--- a/gm/imagefiltersbase.cpp
+++ b/gm/imagefiltersbase.cpp
@@ -30,6 +30,7 @@ public:
return SkNEW(FailImageFilter);
}
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(FailImageFilter)
protected:
@@ -51,6 +52,13 @@ SkFlattenable* FailImageFilter::CreateProc(SkReadBuffer& buffer) {
return FailImageFilter::Create();
}
+#ifndef SK_IGNORE_TO_STRING
+void FailImageFilter::toString(SkString* str) const {
+ str->appendf("FailImageFilter: (");
+ str->append(")");
+}
+#endif
+
class IdentityImageFilter : public SkImageFilter {
public:
class Registrar {
@@ -65,6 +73,7 @@ public:
return SkNEW_ARGS(IdentityImageFilter, (input));
}
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(IdentityImageFilter)
protected:
IdentityImageFilter(SkImageFilter* input) : INHERITED(1, &input) {}
@@ -87,6 +96,13 @@ SkFlattenable* IdentityImageFilter::CreateProc(SkReadBuffer& buffer) {
return IdentityImageFilter::Create(common.getInput(0));
}
+#ifndef SK_IGNORE_TO_STRING
+void IdentityImageFilter::toString(SkString* str) const {
+ str->appendf("IdentityImageFilter: (");
+ str->append(")");
+}
+#endif
+
///////////////////////////////////////////////////////////////////////////////
static void draw_paint(SkCanvas* canvas, const SkRect& r, SkImageFilter* imf) {
« no previous file with comments | « no previous file | gm/imagefiltersgraph.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698