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>
diff --git a/include/private/SkTDArray.h b/include/private/SkTDArray.h
index dd3212d..c6bd4ff 100644
--- a/include/private/SkTDArray.h
+++ b/include/private/SkTDArray.h
@@ -13,6 +13,8 @@
 #include "SkTo.h"
 #include "SkTypes.h"
 
+#include <utility>
+
 template <typename T> class SkTDArray {
 public:
     SkTDArray() : fArray(nullptr), fReserve(0), fCount(0) {}
@@ -67,10 +69,11 @@
         return !(a == b);
     }
 
-    void swap(SkTDArray<T>& other) {
-        SkTSwap(fArray, other.fArray);
-        SkTSwap(fReserve, other.fReserve);
-        SkTSwap(fCount, other.fCount);
+    void swap(SkTDArray<T>& that) {
+        using std::swap;
+        swap(fArray, that.fArray);
+        swap(fReserve, that.fReserve);
+        swap(fCount, that.fCount);
     }
 
     bool isEmpty() const { return fCount == 0; }
@@ -371,4 +374,8 @@
     }
 };
 
+template <typename T> static inline void swap(SkTDArray<T>& a, SkTDArray<T>& b) {
+    a.swap(b);
+}
+
 #endif