diff options
author | reed <reed@google.com> | 2015-05-12 10:37:34 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-12 10:37:34 -0700 |
commit | 80ea19ca4bdd68c1493666a5fe7e4ce9d43ded8b (patch) | |
tree | 1ad73d17a3314363d114ddc95932e271ae1e828a /src/svg/parser | |
parent | 1ebf0d2edc48f886521e6f03af78ef5da24c7982 (diff) |
Revert of Revert of stop calling SkScalarDiv (patchset #1 id:1 of https://codereview.chromium.org/1138263002/)
Reason for revert:
android patched, blink has rolled
Original issue's description:
> Revert of stop calling SkScalarDiv (patchset #4 id:60001 of https://codereview.chromium.org/1135053002/)
>
> Reason for revert:
> need to wait for Blink roll (and patch android)
>
> Original issue's description:
> > stop calling SkScalarDiv
> >
> > BUG=skia:
> > TBR=
> >
> > Committed: https://skia.googlesource.com/skia/+/67d71c898249a7af3523b16c6a69895a63bfae0a
>
> TBR=
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/2629697933b5cc975e45d2a45c48f803fc6cbcec
TBR=
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1135693003
Diffstat (limited to 'src/svg/parser')
-rw-r--r-- | src/svg/parser/SkSVGSVG.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/svg/parser/SkSVGSVG.cpp b/src/svg/parser/SkSVGSVG.cpp index fcce62de9e..61ccb3c819 100644 --- a/src/svg/parser/SkSVGSVG.cpp +++ b/src/svg/parser/SkSVGSVG.cpp @@ -43,11 +43,8 @@ void SkSVGSVG::translate(SkSVGParser& parser, bool defState) { if (strcmp(wSuffix, "pt") == 0) width = SkScalarMulDiv(width, SK_Scalar1 * 72, SK_Scalar1 * 96); SkParse::FindScalars(f_viewBox.c_str(), viewBox, 4); - 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); + SkRect box = SkRect::MakeLTRB(viewBox[0] / width, viewBox[1] / height, + viewBox[2] / width, viewBox[3] / height); if (box.fLeft == 0 && box.fTop == 0 && box.fRight == SK_Scalar1 && box.fBottom == SK_Scalar1) return; |