aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-06-18 15:11:00 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-06-19 02:06:31 +0000
commitf08d1d0ce19c72bb911f059dcf916cf99a0a2467 (patch)
tree65fed059b8bd2b730c86e202cc8475fb60b76455 /tools/viewer
parent93724202640b1f5ae9ccf7646151c9c3bb5afa5c (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 'tools/viewer')
-rw-r--r--tools/viewer/BisectSlide.cpp5
-rw-r--r--tools/viewer/SlideDir.cpp6
2 files changed, 8 insertions, 3 deletions
diff --git a/tools/viewer/BisectSlide.cpp b/tools/viewer/BisectSlide.cpp
index 38ab3c3ffd..0239ef2b0d 100644
--- a/tools/viewer/BisectSlide.cpp
+++ b/tools/viewer/BisectSlide.cpp
@@ -11,6 +11,8 @@
#include "SkPicture.h"
#include "SkStream.h"
+#include <utility>
+
#ifdef SK_XML
#include "SkDOM.h"
#include "../experimental/svg/model/SkSVGDOM.h"
@@ -74,7 +76,8 @@ bool BisectSlide::onChar(SkUnichar c) {
switch (c) {
case 'X':
if (!fTossedPaths.empty()) {
- SkTSwap(fFoundPaths, fTossedPaths);
+ using std::swap;
+ swap(fFoundPaths, fTossedPaths);
if ('X' == fTrail.back()) {
fTrail.pop_back();
} else {
diff --git a/tools/viewer/SlideDir.cpp b/tools/viewer/SlideDir.cpp
index 41bff87b79..0cc1230b38 100644
--- a/tools/viewer/SlideDir.cpp
+++ b/tools/viewer/SlideDir.cpp
@@ -25,6 +25,7 @@
#include "SkTypeface.h"
#include <cmath>
+#include <utility>
namespace {
@@ -147,8 +148,9 @@ public:
void startUnfocus() {
SkASSERT(fTarget);
- SkTSwap(fM0, fM1);
- SkTSwap(fOpacity0, fOpacity1);
+ using std::swap;
+ swap(fM0, fM1);
+ swap(fOpacity0, fOpacity1);
fTimeBase = 0;
fState = State::kUnfocusing;