Index: experimental/svg/model/SkSVGRect.cpp |
diff --git a/experimental/svg/model/SkSVGRect.cpp b/experimental/svg/model/SkSVGRect.cpp |
index 288fc4825828fc9f659452de8e2da392e2a65e09..b65c2b9974b0a99ac8d04fa9980042e5ebffaa33 100644 |
--- a/experimental/svg/model/SkSVGRect.cpp |
+++ b/experimental/svg/model/SkSVGRect.cpp |
@@ -58,11 +58,5 @@ void SkSVGRect::onSetAttribute(SkSVGAttribute attr, const SkSVGValue& v) { |
void SkSVGRect::onDraw(SkCanvas* canvas, const SkSVGLengthContext& lctx, |
const SkPaint& paint) const { |
- const SkRect r = SkRect::MakeXYWH( |
- lctx.resolve(fX, SkSVGLengthContext::LengthType::kHorizontal), |
- lctx.resolve(fY, SkSVGLengthContext::LengthType::kVertical), |
- lctx.resolve(fWidth, SkSVGLengthContext::LengthType::kHorizontal), |
- lctx.resolve(fHeight, SkSVGLengthContext::LengthType::kVertical)); |
- |
- canvas->drawRect(r, paint); |
+ canvas->drawRect(lctx.resolveRect(fX, fY, fWidth, fHeight), paint); |
} |