aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkScan_Antihair.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkScan_Antihair.cpp')
-rw-r--r--src/core/SkScan_Antihair.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/core/SkScan_Antihair.cpp b/src/core/SkScan_Antihair.cpp
index 37faed4850..ade4818537 100644
--- a/src/core/SkScan_Antihair.cpp
+++ b/src/core/SkScan_Antihair.cpp
@@ -14,6 +14,8 @@
#include "SkRasterClip.h"
#include "SkTo.h"
+#include <utility>
+
/* Our attempt to compute the worst case "bounds" for the horizontal and
vertical cases has some numerical bug in it, and we sometimes undervalue
our extends. The bug is that when this happens, we will set the clip to
@@ -344,8 +346,9 @@ static void do_anti_hairline(SkFDot6 x0, SkFDot6 y0, SkFDot6 x1, SkFDot6 y1,
if (SkAbs32(x1 - x0) > SkAbs32(y1 - y0)) { // mostly horizontal
if (x0 > x1) { // we want to go left-to-right
- SkTSwap<SkFDot6>(x0, x1);
- SkTSwap<SkFDot6>(y0, y1);
+ using std::swap;
+ swap(x0, x1);
+ swap(y0, y1);
}
istart = SkFDot6Floor(x0);
@@ -417,8 +420,9 @@ static void do_anti_hairline(SkFDot6 x0, SkFDot6 y0, SkFDot6 x1, SkFDot6 y1,
}
} else { // mostly vertical
if (y0 > y1) { // we want to go top-to-bottom
- SkTSwap<SkFDot6>(x0, x1);
- SkTSwap<SkFDot6>(y0, y1);
+ using std::swap;
+ swap(x0, x1);
+ swap(y0, y1);
}
istart = SkFDot6Floor(y0);