diff options
author | reed <reed@google.com> | 2015-05-12 10:28:06 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-05-12 10:28:06 -0700 |
commit | 2629697933b5cc975e45d2a45c48f803fc6cbcec (patch) | |
tree | 53730ca8354552773d93adfe7ade5f1e2bc18192 /gm/glyph_pos.cpp | |
parent | 39a9a5069b25aa8b9529118cfd0ece5f412fb56b (diff) |
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:
Review URL: https://codereview.chromium.org/1138263002
Diffstat (limited to 'gm/glyph_pos.cpp')
-rw-r--r-- | gm/glyph_pos.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/gm/glyph_pos.cpp b/gm/glyph_pos.cpp index 16cdfca11a..0da59ac6f9 100644 --- a/gm/glyph_pos.cpp +++ b/gm/glyph_pos.cpp @@ -82,8 +82,10 @@ protected: canvas->scale(3.0f, 3.0f); SkMatrix skew; skew.setIdentity(); - skew.setSkewX(8.0f / 25.0f); - skew.setSkewY(2.0f / 25.0f); + skew.setSkewX(SkScalarDiv(8.0f, + 25.0f)); + skew.setSkewY(SkScalarDiv(2.0f, + 25.0f)); canvas->concat(skew); drawTestCase(canvas, 1.0f); canvas->restore(); @@ -93,9 +95,11 @@ protected: canvas->save(); SkMatrix perspective; perspective.setIdentity(); - perspective.setPerspX(-SkScalarInvert(340)); - perspective.setSkewX(8.0f / 25.0f); - perspective.setSkewY(2.0f / 25.0f); + perspective.setPerspX(-SkScalarDiv(SK_Scalar1, 340.0f)); + perspective.setSkewX(SkScalarDiv(8.0f, + 25.0f)); + perspective.setSkewY(SkScalarDiv(2.0f, + 25.0f)); canvas->concat(perspective); |