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

Unified Diff: src/effects/SkBitmapSource.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/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/effects/SkBitmapSource.cpp
diff --git a/src/effects/SkBitmapSource.cpp b/src/effects/SkBitmapSource.cpp
index ff76ab4bba71fd314e371ef7163cc736b7b06f15..fc86f194b059909651518d6c29da3413c316e36b 100644
--- a/src/effects/SkBitmapSource.cpp
+++ b/src/effects/SkBitmapSource.cpp
@@ -83,3 +83,15 @@ bool SkBitmapSource::onFilterImage(Proxy* proxy, const SkBitmap&, const Context&
void SkBitmapSource::computeFastBounds(const SkRect&, SkRect* dst) const {
*dst = fDstRect;
}
+
+#ifndef SK_IGNORE_TO_STRING
+void SkBitmapSource::toString(SkString* str) const {
+ str->appendf("SkBitmapSource: (");
+ str->appendf("src: (%f,%f,%f,%f) dst: (%f,%f,%f,%f) ",
+ fSrcRect.fLeft, fSrcRect.fTop, fSrcRect.fRight, fSrcRect.fBottom,
+ fDstRect.fLeft, fDstRect.fTop, fDstRect.fRight, fDstRect.fBottom);
+ str->appendf("bitmap: (%d,%d)",
+ fBitmap.width(), fBitmap.height());
+ str->append(")");
+}
+#endif
« no previous file with comments | « src/effects/SkAlphaThresholdFilter.cpp ('k') | src/effects/SkBlurImageFilter.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698