diff options
author | Ben Wagner <bungeman@google.com> | 2018-06-18 15:11:00 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2018-06-19 02:06:31 +0000 |
commit | f08d1d0ce19c72bb911f059dcf916cf99a0a2467 (patch) | |
tree | 65fed059b8bd2b730c86e202cc8475fb60b76455 /docs | |
parent | 93724202640b1f5ae9ccf7646151c9c3bb5afa5c (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 'docs')
-rw-r--r-- | docs/SkColor_Reference.bmh | 5 | ||||
-rw-r--r-- | docs/SkPixmap_Reference.bmh | 5 |
2 files changed, 6 insertions, 4 deletions
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)); } } } |