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

Unified Diff: src/effects/SkLightingImageFilter.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/SkDropShadowImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkLightingImageFilter.cpp
diff --git a/src/effects/SkLightingImageFilter.cpp b/src/effects/SkLightingImageFilter.cpp
index 8acd7fd97d2c6ca44e75807fd49528c60b1d79a2..b1271d8493194a8a1251a7c776cf5feb2b147314 100644
--- a/src/effects/SkLightingImageFilter.cpp
+++ b/src/effects/SkLightingImageFilter.cpp
@@ -282,6 +282,7 @@ public:
static SkImageFilter* Create(SkLight* light, SkScalar surfaceScale, SkScalar kd, SkImageFilter*,
const CropRect*, uint32_t uniqueID = 0);
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkDiffuseLightingImageFilter)
SkScalar kd() const { return fKD; }
@@ -309,6 +310,7 @@ public:
SkScalar ks, SkScalar shininess, SkImageFilter*, const CropRect*,
uint32_t uniqueID = 0);
+ SK_TO_STRING_OVERRIDE()
SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkSpecularLightingImageFilter)
SkScalar ks() const { return fKS; }
@@ -1035,6 +1037,14 @@ bool SkDiffuseLightingImageFilter::onFilterImage(Proxy* proxy,
return true;
}
+#ifndef SK_IGNORE_TO_STRING
+void SkDiffuseLightingImageFilter::toString(SkString* str) const {
+ str->appendf("SkDiffuseLightingImageFilter: (");
+ str->appendf("kD: %f\n", fKD);
+ str->append(")");
+}
+#endif
+
#if SK_SUPPORT_GPU
bool SkDiffuseLightingImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
GrTexture* texture,
@@ -1142,6 +1152,14 @@ bool SkSpecularLightingImageFilter::onFilterImage(Proxy* proxy,
return true;
}
+#ifndef SK_IGNORE_TO_STRING
+void SkSpecularLightingImageFilter::toString(SkString* str) const {
+ str->appendf("SkSpecularLightingImageFilter: (");
+ str->appendf("kS: %f shininess: %f", fKS, fShininess);
+ str->append(")");
+}
+#endif
+
#if SK_SUPPORT_GPU
bool SkSpecularLightingImageFilter::asFragmentProcessor(GrFragmentProcessor** fp,
GrTexture* texture,
« no previous file with comments | « src/effects/SkDropShadowImageFilter.cpp ('k') | src/effects/SkMagnifierImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698