diff options
Diffstat (limited to 'src/core/SkScan_AAAPath.cpp')
-rw-r--r-- | src/core/SkScan_AAAPath.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/core/SkScan_AAAPath.cpp b/src/core/SkScan_AAAPath.cpp index bd649e7aef..9dbb271890 100644 --- a/src/core/SkScan_AAAPath.cpp +++ b/src/core/SkScan_AAAPath.cpp @@ -23,6 +23,8 @@ #include "SkTo.h" #include "SkUtils.h" +#include <utility> + /////////////////////////////////////////////////////////////////////////////// /* @@ -581,8 +583,8 @@ static inline SkAlpha f2a(SkFixed f) { // Suppose that line (l1, y)-(r1, y+1) intersects with (l2, y)-(r2, y+1), // approximate (very coarsely) the x coordinate of the intersection. static inline SkFixed approximateIntersection(SkFixed l1, SkFixed r1, SkFixed l2, SkFixed r2) { - if (l1 > r1) { SkTSwap(l1, r1); } - if (l2 > r2) { SkTSwap(l2, r2); } + if (l1 > r1) { using std::swap; swap(l1, r1); } + if (l2 > r2) { using std::swap; swap(l2, r2); } return (SkTMax(l1, l2) + SkTMin(r1, r2)) >> 1; } @@ -830,8 +832,8 @@ static SK_ALWAYS_INLINE void blit_trapezoid_row(AdditiveBlitter* blitter, int y, // to exclude the area that's not covered by the path. // Swapping (ul, ll) or (ur, lr) won't affect that exclusion // so we'll do that for simplicity. - if (ul > ll) { SkTSwap(ul, ll); } - if (ur > lr) { SkTSwap(ur, lr); } + if (ul > ll) { using std::swap; swap(ul, ll); } + if (ur > lr) { using std::swap; swap(ur, lr); } SkFixed joinLeft = SkFixedCeilToFixed(ll); SkFixed joinRite = SkFixedFloorToFixed(ur); @@ -978,7 +980,8 @@ static inline bool isSmoothEnough(SkAnalyticEdge* leftE, SkAnalyticEdge* riteE, } // Ensure that currE is the next left edge and nextCurrE is the next right edge. Swap if not. if (nextCurrE->fUpperX < currE->fUpperX) { - SkTSwap(currE, nextCurrE); + using std::swap; + swap(currE, nextCurrE); } return isSmoothEnough(leftE, currE, stop_y) && isSmoothEnough(riteE, nextCurrE, stop_y); } @@ -1037,7 +1040,8 @@ static inline void aaa_walk_convex_edges(SkAnalyticEdge* prevHead, if (leftE->fX > riteE->fX || (leftE->fX == riteE->fX && leftE->fDX > riteE->fDX)) { - SkTSwap(leftE, riteE); + using std::swap; + swap(leftE, riteE); } SkFixed local_bot_fixed = SkMin32(leftE->fLowerY, riteE->fLowerY); |