aboutsummaryrefslogtreecommitdiffhomepage
path: root/experimental/svg
diff options
context:
space:
mode:
authorGravatar Florin Malita <fmalita@chromium.org>2017-10-11 10:13:47 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-11 16:48:57 +0000
commit98395d00d25edfdaf92f89961774a0bc6d4cddea (patch)
tree4f67d9e168505a070d9561ffcd1a146a7e4dbd9f /experimental/svg
parent6756f9aa344b4e7f0840159a0998b4c25fa190f3 (diff)
[SVGDom] Fix SkSVGTransformableNode::mapToParent()
The method is used for clip path resolution, and is supposed to transform the path into parent node coords -- so it should use the forward matrix, not the inverse. Change-Id: Id6eb9fbaf024b083e19f56eddb1c293becea48fc Reviewed-on: https://skia-review.googlesource.com/58280 Reviewed-by: Robert Phillips <robertphillips@google.com> Commit-Queue: Florin Malita <fmalita@chromium.org>
Diffstat (limited to 'experimental/svg')
-rw-r--r--experimental/svg/model/SkSVGTransformableNode.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/experimental/svg/model/SkSVGTransformableNode.cpp b/experimental/svg/model/SkSVGTransformableNode.cpp
index b2ad0b1ab9..aa2a814f58 100644
--- a/experimental/svg/model/SkSVGTransformableNode.cpp
+++ b/experimental/svg/model/SkSVGTransformableNode.cpp
@@ -38,14 +38,6 @@ void SkSVGTransformableNode::onSetAttribute(SkSVGAttribute attr, const SkSVGValu
}
void SkSVGTransformableNode::mapToParent(SkPath* path) const {
- if (fTransform.value().isIdentity()) {
- return;
- }
-
- SkMatrix inv;
- if (!fTransform.value().invert(&inv)) {
- return;
- }
-
- path->transform(inv);
+ // transforms the path to parent node coordinates.
+ path->transform(fTransform.value());
}