Index: src/effects/SkMatrixConvolutionImageFilter.cpp |
diff --git a/src/effects/SkMatrixConvolutionImageFilter.cpp b/src/effects/SkMatrixConvolutionImageFilter.cpp |
index 045f6a96d58cce817489badad9c3162e01c342b6..e9dd87852f4ee406d0165e65ee7b2cd354d69bd3 100644 |
--- a/src/effects/SkMatrixConvolutionImageFilter.cpp |
+++ b/src/effects/SkMatrixConvolutionImageFilter.cpp |
@@ -369,3 +369,20 @@ bool SkMatrixConvolutionImageFilter::asFragmentProcessor(GrFragmentProcessor** f |
return true; |
} |
#endif |
+ |
+#ifndef SK_IGNORE_TO_STRING |
+void SkMatrixConvolutionImageFilter::toString(SkString* str) const { |
+ str->appendf("SkMatrixConvolutionImageFilter: ("); |
+ str->appendf("size: (%d,%d) kernel: (", fKernelSize.width(), fKernelSize.height()); |
+ for (int y = 0; y < fKernelSize.height(); y++) { |
+ for (int x = 0; x < fKernelSize.width(); x++) { |
+ str->appendf("%f ", fKernel[y * fKernelSize.width() + x]); |
+ } |
+ } |
+ str->appendf(")"); |
+ str->appendf("gain: %f bias: %f ", fGain, fBias); |
+ str->appendf("offset: (%d, %d) ", fKernelOffset.fX, fKernelOffset.fY); |
+ str->appendf("convolveAlpha: %s", fConvolveAlpha ? "true" : "false"); |
+ str->append(")"); |
+} |
+#endif |