aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/effects/SkXfermodeImageFilter.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2015-06-02 10:52:43 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-06-02 10:52:43 -0700
commit05be93bbdf09576f7903130e3b106b0a8c7c4b4e (patch)
tree1e94f845fda357453a25d6195d905fea1d13116c /src/effects/SkXfermodeImageFilter.cpp
parent91284caa23274d2336884913bc7806745071bd72 (diff)
Fix dst bound reported by SkTileImageFilter
In the example from the bug we had the filter DAG: color filter (table) 0: xfermode filter (arith) 0: tile filter [0,80,34,114] -> [0,80,800,480] 0: color filter (table) 0: bitmap src 34x34 -> [0,80,34,114] 1: color filter (table) 0: picture filter [0, 80, 800, 480] computeFastBounds was coming out of the DAG with a bound of [0,80,34,114] which didn't represent the pixels that would be drawn. This CL updates SkTileImageFilter to correctly set the bound for the pixels it will hit. BUG=493783 Review URL: https://codereview.chromium.org/1152553006
Diffstat (limited to 'src/effects/SkXfermodeImageFilter.cpp')
-rw-r--r--src/effects/SkXfermodeImageFilter.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/src/effects/SkXfermodeImageFilter.cpp b/src/effects/SkXfermodeImageFilter.cpp
index f98247a2f4..599fd42b12 100644
--- a/src/effects/SkXfermodeImageFilter.cpp
+++ b/src/effects/SkXfermodeImageFilter.cpp
@@ -105,7 +105,18 @@ void SkXfermodeImageFilter::toString(SkString* str) const {
if (fMode) {
fMode->toString(str);
}
- str->append("))");
+ str->append(")");
+ if (this->getInput(0)) {
+ str->appendf("foreground: (");
+ this->getInput(0)->toString(str);
+ str->appendf(")");
+ }
+ if (this->getInput(1)) {
+ str->appendf("background: (");
+ this->getInput(1)->toString(str);
+ str->appendf(")");
+ }
+ str->append(")");
}
#endif