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 /src/gpu/effects | |
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 'src/gpu/effects')
-rw-r--r-- | src/gpu/effects/GrTextureDomain.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gpu/effects/GrTextureDomain.cpp b/src/gpu/effects/GrTextureDomain.cpp index 81e8da1a7d..e2197023b1 100644 --- a/src/gpu/effects/GrTextureDomain.cpp +++ b/src/gpu/effects/GrTextureDomain.cpp @@ -19,6 +19,8 @@ #include "glsl/GrGLSLShaderBuilder.h" #include "glsl/GrGLSLUniformHandler.h" +#include <utility> + static bool can_ignore_rect(GrTextureProxy* proxy, const SkRect& domain) { if (GrProxyProvider::IsFunctionallyExact(proxy)) { const SkIRect kFullRect = SkIRect::MakeWH(proxy->width(), proxy->height()); @@ -184,7 +186,8 @@ void GrTextureDomain::GLDomain::setData(const GrGLSLProgramDataManager& pdman, values[3] = 1.0f - values[3]; // The top and bottom were just flipped, so correct the ordering // of elements so that values = (l, t, r, b). - SkTSwap(values[1], values[3]); + using std::swap; + swap(values[1], values[3]); } if (0 != memcmp(values, fPrevDomain, kPrevDomainCount * sizeof(float))) { pdman.set4fv(fDomainUni, 1, values); |