diff options
author | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-17 19:22:07 +0000 |
---|---|---|
committer | reed@google.com <reed@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-12-17 19:22:07 +0000 |
commit | e1ca705cac4b946993f6cbf798e2a0ba27e739f3 (patch) | |
tree | 9757af858cadeea671264651780935b00d8c0252 /src/effects/SkDiscretePathEffect.cpp | |
parent | 3fb15f4d21292a319dc6522bfc99c89a7a5eac68 (diff) |
deprecate SkScalarRound (and its ilk), use SkScalarRound[ToInt,ToScalar]. #define SK_SUPPORT_DEPRECATED_SCALARROUND for legacy clients
BUG=
R=robertphillips@google.com
Review URL: https://codereview.chromium.org/111353003
git-svn-id: http://skia.googlecode.com/svn/trunk@12719 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src/effects/SkDiscretePathEffect.cpp')
-rw-r--r-- | src/effects/SkDiscretePathEffect.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/effects/SkDiscretePathEffect.cpp b/src/effects/SkDiscretePathEffect.cpp index eece2eff86..b7ec1de3e0 100644 --- a/src/effects/SkDiscretePathEffect.cpp +++ b/src/effects/SkDiscretePathEffect.cpp @@ -30,7 +30,7 @@ bool SkDiscretePathEffect::filterPath(SkPath* dst, const SkPath& src, bool doFill = rec->isFillStyle(); SkPathMeasure meas(src, doFill); - uint32_t seed = SkScalarRound(meas.getLength()); + uint32_t seed = SkScalarRoundToInt(meas.getLength()); SkLCGRandom rand(seed ^ ((seed << 16) | (seed >> 16))); SkScalar scale = fPerterb; SkPoint p; @@ -42,7 +42,7 @@ bool SkDiscretePathEffect::filterPath(SkPath* dst, const SkPath& src, if (fSegLength * (2 + doFill) > length) { meas.getSegment(0, length, dst, true); // to short for us to mangle } else { - int n = SkScalarRound(SkScalarDiv(length, fSegLength)); + int n = SkScalarRoundToInt(length / fSegLength); SkScalar delta = length / n; SkScalar distance = 0; |