Update ColorFilterImageFilter & BlurImageFilter debugger strings

This CL allows us to see the image filter DAG in the debugger.

Review URL: https://codereview.chromium.org/811913004
This commit is contained in:
robertphillips 2014-12-22 06:52:04 -08:00 committed by Commit bot
parent fb4aca9ce6
commit 33cca886b7
2 changed files with 14 additions and 3 deletions

View File

@ -291,7 +291,12 @@ bool SkBlurImageFilter::filterImageGPU(Proxy* proxy, const SkBitmap& src, const
#ifndef SK_IGNORE_TO_STRING
void SkBlurImageFilter::toString(SkString* str) const {
str->appendf("SkBlurImageFilter: (");
str->appendf("sigma: (%f, %f)", fSigma.fWidth, fSigma.fHeight);
str->append(")");
str->appendf("sigma: (%f, %f) input (", fSigma.fWidth, fSigma.fHeight);
if (this->getInput(0)) {
this->getInput(0)->toString(str);
}
str->append("))");
}
#endif

View File

@ -146,7 +146,13 @@ bool SkColorFilterImageFilter::asColorFilter(SkColorFilter** filter) const {
void SkColorFilterImageFilter::toString(SkString* str) const {
str->appendf("SkColorFilterImageFilter: (");
str->appendf("color filter: ");
str->appendf("input: (");
if (this->getInput(0)) {
this->getInput(0)->toString(str);
}
str->appendf(") color filter: ");
fColorFilter->toString(str);
str->append(")");