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

Unified Diff: src/effects/SkColorFilters.cpp

Issue 15697012: Add printing of SkColorFilter-derived classes to debugger (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Remove unnecessary macros Created 7 years, 7 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 | « src/core/SkPaint.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkColorFilters.cpp
===================================================================
--- src/effects/SkColorFilters.cpp (revision 9237)
+++ src/effects/SkColorFilters.cpp (working copy)
@@ -12,6 +12,7 @@
#include "SkColorPriv.h"
#include "SkFlattenableBuffers.h"
#include "SkUtils.h"
+#include "SkString.h"
#define ILLEGAL_XFERMODE_MODE ((SkXfermode::Mode)-1)
@@ -75,6 +76,15 @@
}
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkModeColorFilter: color: 0x");
+ str->appendHex(fColor);
+ str->append(" mode: ");
+ str->append(SkXfermode::ModeName(fMode));
+ }
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkModeColorFilter)
protected:
@@ -260,6 +270,15 @@
}
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkLightingColorFilter: mul: 0x");
+ str->appendHex(fMul);
+ str->append(" add: 0x");
+ str->appendHex(fAdd);
+ }
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter)
protected:
@@ -305,6 +324,13 @@
}
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkLightingColorFilter_JustAdd: add: 0x");
+ str->appendHex(fAdd);
+ }
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_JustAdd)
protected:
@@ -339,6 +365,13 @@
}
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkLightingColorFilter_JustMul: mul: 0x");
+ str->appendHex(fMul);
+ }
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_JustMul)
protected:
@@ -376,6 +409,13 @@
}
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkLightingColorFilter_SingleMul: mul: 0x");
+ str->appendHex(fMul);
+ }
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_SingleMul)
protected:
@@ -415,6 +455,15 @@
}
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkLightingColorFilter_NoPin: mul: 0x");
+ str->appendHex(fMul);
+ str->append(" add: 0x");
+ str->appendHex(fAdd);
+ }
+#endif
+
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkLightingColorFilter_NoPin)
protected:
@@ -433,6 +482,12 @@
return SkNEW(SkSimpleColorFilter);
}
+#ifdef SK_DEVELOPER
+ virtual void toString(SkString* str) const SK_OVERRIDE {
+ str->append("SkSimpleColorFilter");
+ }
+#endif
+
protected:
void filterSpan(const SkPMColor src[], int count, SkPMColor
result[]) const SK_OVERRIDE {
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/effects/SkColorMatrixFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698