Index: src/svg/parser/SkSVGSVG.cpp |
diff --git a/src/svg/parser/SkSVGSVG.cpp b/src/svg/parser/SkSVGSVG.cpp |
index 61ccb3c8196218572b713503b2bf705da97246e3..fcce62de9e8338704551139298d7c2ba2baea65a 100644 |
--- a/src/svg/parser/SkSVGSVG.cpp |
+++ b/src/svg/parser/SkSVGSVG.cpp |
@@ -43,8 +43,11 @@ |
if (strcmp(wSuffix, "pt") == 0) |
width = SkScalarMulDiv(width, SK_Scalar1 * 72, SK_Scalar1 * 96); |
SkParse::FindScalars(f_viewBox.c_str(), viewBox, 4); |
- SkRect box = SkRect::MakeLTRB(viewBox[0] / width, viewBox[1] / height, |
- viewBox[2] / width, viewBox[3] / height); |
+ SkRect box; |
+ box.fLeft = SkScalarDiv(viewBox[0], width); |
+ box.fTop = SkScalarDiv(viewBox[1], height); |
+ box.fRight = SkScalarDiv(viewBox[2], width); |
+ box.fBottom = SkScalarDiv(viewBox[3], height); |
if (box.fLeft == 0 && box.fTop == 0 && |
box.fRight == SK_Scalar1 && box.fBottom == SK_Scalar1) |
return; |