diff options
author | Ben Wagner <bungeman@google.com> | 2018-06-18 15:11:00 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-19 02:06:31 +0000 |
commit | f08d1d0ce19c72bb911f059dcf916cf99a0a2467 (patch) | |
tree | 65fed059b8bd2b730c86e202cc8475fb60b76455 /src/core/SkStrokerPriv.cpp | |
parent | 93724202640b1f5ae9ccf7646151c9c3bb5afa5c (diff) |
Stop using SkTSwap.
Use std::swap instead. It does not appear that any external user
specializes SkTSwap, but some may still use it. This removes all use in
Skia so that SkTSwap can later be removed in a smaller CL. After that
the <utility> include can be removed from SkTypes.h.
Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753
Reviewed-on: https://skia-review.googlesource.com/135578
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'src/core/SkStrokerPriv.cpp')
-rw-r--r-- | src/core/SkStrokerPriv.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/SkStrokerPriv.cpp b/src/core/SkStrokerPriv.cpp index be7b1f5eb4..87bc172926 100644 --- a/src/core/SkStrokerPriv.cpp +++ b/src/core/SkStrokerPriv.cpp @@ -10,6 +10,8 @@ #include "SkPath.h" #include "SkPointPriv.h" +#include <utility> + static void ButtCapper(SkPath* path, const SkPoint& pivot, const SkVector& normal, const SkPoint& stop, SkPath*) { path->lineTo(stop.fX, stop.fY); @@ -86,7 +88,8 @@ static void BluntJoiner(SkPath* outer, SkPath* inner, const SkVector& beforeUnit afterUnitNormal.scale(radius, &after); if (!is_clockwise(beforeUnitNormal, afterUnitNormal)) { - SkTSwap<SkPath*>(outer, inner); + using std::swap; + swap(outer, inner); after.negate(); } @@ -108,7 +111,8 @@ static void RoundJoiner(SkPath* outer, SkPath* inner, const SkVector& beforeUnit SkRotationDirection dir = kCW_SkRotationDirection; if (!is_clockwise(before, after)) { - SkTSwap<SkPath*>(outer, inner); + using std::swap; + swap(outer, inner); before.negate(); after.negate(); dir = kCCW_SkRotationDirection; @@ -153,7 +157,8 @@ static void MiterJoiner(SkPath* outer, SkPath* inner, const SkVector& beforeUnit ccw = !is_clockwise(before, after); if (ccw) { - SkTSwap<SkPath*>(outer, inner); + using std::swap; + swap(outer, inner); before.negate(); after.negate(); } |