From f08d1d0ce19c72bb911f059dcf916cf99a0a2467 Mon Sep 17 00:00:00 2001 From: Ben Wagner Date: Mon, 18 Jun 2018 15:11:00 -0400 Subject: 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 include can be removed from SkTypes.h. Change-Id: If03d4ee07dbecda961aa9f0dc34d171ef5168753 Reviewed-on: https://skia-review.googlesource.com/135578 Reviewed-by: Hal Canary Reviewed-by: Mike Klein Commit-Queue: Ben Wagner --- docs/SkColor_Reference.bmh | 5 +++-- docs/SkPixmap_Reference.bmh | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'docs') diff --git a/docs/SkColor_Reference.bmh b/docs/SkColor_Reference.bmh index a92e393853..27b76a58dc 100644 --- a/docs/SkColor_Reference.bmh +++ b/docs/SkColor_Reference.bmh @@ -676,8 +676,9 @@ hsv[2] contains HSV_Value, a value from zero to one. for (int y = 0; y < 256; ++y) { for (int x = 0; x < 256; ++x) { SkScalar hsv[3]; - SkColorToHSV(source.getColor(x, y), hsv); - SkTSwap(hsv[1], hsv[2]); + SkColorToHSV(source.getColor(x, y), hsv) + using std::swap; + swap(hsv[1], hsv[2]); SkPaint paint; paint.setColor(SkHSVToColor(hsv)); canvas->drawRect(SkRect::MakeXYWH(x, y, 1, 1), paint); diff --git a/docs/SkPixmap_Reference.bmh b/docs/SkPixmap_Reference.bmh index 432324e3e2..019c13a8ac 100644 --- a/docs/SkPixmap_Reference.bmh +++ b/docs/SkPixmap_Reference.bmh @@ -1387,8 +1387,9 @@ One word corresponds to one pixel. for (int y = 0; y < pixmap.height() / 2; ++y) { for (int x = 0; x < pixmap.width(); ++x) { if ((x & 4) == (y & 4)) { - SkTSwap(*pixmap.writable_addr32(x, y), - *pixmap.writable_addr32(pixmap.width() - x, pixmap.height() - y)); + using std::swap; + swap(*pixmap.writable_addr32(x, y), + *pixmap.writable_addr32(pixmap.width() - x, pixmap.height() - y)); } } } -- cgit v1.2.3