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/SkAnalyticEdge.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/SkAnalyticEdge.cpp')
-rw-r--r-- | src/core/SkAnalyticEdge.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/SkAnalyticEdge.cpp b/src/core/SkAnalyticEdge.cpp index 60c956aaf8..9226aca5ff 100644 --- a/src/core/SkAnalyticEdge.cpp +++ b/src/core/SkAnalyticEdge.cpp @@ -11,6 +11,8 @@ #include "SkMathPriv.h" #include "SkTo.h" +#include <utility> + // This will become a bottleneck for small ovals rendering if we call SkFixedDiv twice here. // Therefore, we'll let the outter function compute the slope once and send in the value. // Moreover, we'll compute fDY by quickly lookup the inverse table (if possible). @@ -24,8 +26,9 @@ bool SkAnalyticEdge::updateLine(SkFixed x0, SkFixed y0, SkFixed x1, SkFixed y1, // We don't chop at y extrema for cubics so the y is not guaranteed to be increasing for them. // In that case, we have to swap x/y and negate the winding. if (y0 > y1) { - SkTSwap(x0, x1); - SkTSwap(y0, y1); + using std::swap; + swap(x0, x1); + swap(y0, y1); fWinding = -fWinding; } |