aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/SkEdge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/SkEdge.cpp')
-rw-r--r--src/core/SkEdge.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/src/core/SkEdge.cpp b/src/core/SkEdge.cpp
index 0a19e53221..905e17f58a 100644
--- a/src/core/SkEdge.cpp
+++ b/src/core/SkEdge.cpp
@@ -11,6 +11,8 @@
#include "SkMathPriv.h"
#include "SkTo.h"
+#include <utility>
+
/*
In setLine, setQuadratic, setCubic, the first thing we do is to convert
the points into FDot6. This is modulated by the shift parameter, which
@@ -53,8 +55,9 @@ int SkEdge::setLine(const SkPoint& p0, const SkPoint& p1, const SkIRect* clip,
int winding = 1;
if (y0 > y1) {
- SkTSwap(x0, x1);
- SkTSwap(y0, y1);
+ using std::swap;
+ swap(x0, x1);
+ swap(y0, y1);
winding = -1;
}
@@ -204,8 +207,9 @@ bool SkQuadraticEdge::setQuadraticWithoutUpdate(const SkPoint pts[3], int shift)
int winding = 1;
if (y0 > y2)
{
- SkTSwap(x0, x2);
- SkTSwap(y0, y2);
+ using std::swap;
+ swap(x0, x2);
+ swap(y0, y2);
winding = -1;
}
SkASSERT(y0 <= y1 && y1 <= y2);
@@ -377,10 +381,11 @@ bool SkCubicEdge::setCubicWithoutUpdate(const SkPoint pts[4], int shift, bool so
int winding = 1;
if (sortY && y0 > y3)
{
- SkTSwap(x0, x3);
- SkTSwap(x1, x2);
- SkTSwap(y0, y3);
- SkTSwap(y1, y2);
+ using std::swap;
+ swap(x0, x3);
+ swap(x1, x2);
+ swap(y0, y3);
+ swap(y1, y2);
winding = -1;
}