[svg] Implement onObjectBoundingBox for circle and path
Also removed an erroneous call to mapToRect() when returning bounds
for SkSVGContainer. The contexts in which we access object bounds are
always such that any transforms have already been applied.
Change-Id: Ieac488e1699d3ebff56038d6ada36737291671eb
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/345117
Commit-Queue: Tyler Denniston <tdenniston@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
diff --git a/modules/svg/src/SkSVGPath.cpp b/modules/svg/src/SkSVGPath.cpp
index f839379..256feb8 100644
--- a/modules/svg/src/SkSVGPath.cpp
+++ b/modules/svg/src/SkSVGPath.cpp
@@ -39,3 +39,7 @@
this->mapToParent(&path);
return path;
}
+
+SkRect SkSVGPath::onObjectBoundingBox(const SkSVGRenderContext& ctx) const {
+ return fPath.computeTightBounds();
+}