aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu')
-rw-r--r--src/gpu/GrShape.cpp5
-rw-r--r--src/gpu/GrTessellator.cpp6
-rw-r--r--src/gpu/effects/GrTextureDomain.cpp5
-rw-r--r--src/gpu/ops/GrOvalOpFactory.cpp5
-rw-r--r--src/gpu/vk/GrVkGpu.cpp5
5 files changed, 20 insertions, 6 deletions
diff --git a/src/gpu/GrShape.cpp b/src/gpu/GrShape.cpp
index d74b144741..a0a395bf66 100644
--- a/src/gpu/GrShape.cpp
+++ b/src/gpu/GrShape.cpp
@@ -7,6 +7,8 @@
#include "GrShape.h"
+#include <utility>
+
GrShape& GrShape::operator=(const GrShape& that) {
fStyle = that.fStyle;
this->changeType(that.fType, Type::kPath == that.fType ? &that.path() : nullptr);
@@ -674,7 +676,8 @@ void GrShape::attemptToSimplifyLine() {
// the point order.
SkPoint* pts = fLineData.fPts;
if (pts[1].fY < pts[0].fY || (pts[1].fY == pts[0].fY && pts[1].fX < pts[0].fX)) {
- SkTSwap(pts[0], pts[1]);
+ using std::swap;
+ swap(pts[0], pts[1]);
}
}
diff --git a/src/gpu/GrTessellator.cpp b/src/gpu/GrTessellator.cpp
index 6490c5b73a..2dd82a0892 100644
--- a/src/gpu/GrTessellator.cpp
+++ b/src/gpu/GrTessellator.cpp
@@ -17,7 +17,8 @@
#include "SkTDPQueue.h"
#include <algorithm>
-#include <stdio.h>
+#include <cstdio>
+#include <utility>
/*
* There are six stages to the basic algorithm:
@@ -1682,7 +1683,8 @@ void reconnect(Edge* edge, Vertex* src, Vertex* dst, Comparator& c) {
return;
}
if (c.sweep_lt(edge->fBottom->fPoint, edge->fTop->fPoint)) {
- SkTSwap(edge->fTop, edge->fBottom);
+ using std::swap;
+ swap(edge->fTop, edge->fBottom);
edge->fWinding *= -1;
}
edge->recompute();
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);
diff --git a/src/gpu/ops/GrOvalOpFactory.cpp b/src/gpu/ops/GrOvalOpFactory.cpp
index 747fa5f119..7b0e4621e9 100644
--- a/src/gpu/ops/GrOvalOpFactory.cpp
+++ b/src/gpu/ops/GrOvalOpFactory.cpp
@@ -25,6 +25,8 @@
#include "ops/GrMeshDrawOp.h"
#include "ops/GrSimpleMeshDrawOpHelper.h"
+#include <utility>
+
namespace {
struct EllipseVertex {
@@ -973,7 +975,8 @@ public:
// If the matrix included scale (on one axis) we need to swap our start and end points
if ((viewMatrix.getScaleX() < 0) != (viewMatrix.getScaleY() < 0)) {
- SkTSwap(startPoint, stopPoint);
+ using std::swap;
+ swap(startPoint, stopPoint);
}
fRoundCaps = style.strokeRec().getWidth() > 0 &&
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index d0eb8765ba..1149855b1b 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -39,6 +39,8 @@
#include "vk/GrVkInterface.h"
#include "vk/GrVkTypes.h"
+#include <utility>
+
#if !defined(SK_BUILD_FOR_WIN)
#include <unistd.h>
#endif // !defined(SK_BUILD_FOR_WIN)
@@ -1628,7 +1630,8 @@ void GrVkGpu::copySurfaceAsBlit(GrSurface* dst, GrSurfaceOrigin dstOrigin,
// If we have different origins, we need to flip the top and bottom of the dst rect so that we
// get the correct origintation of the copied data.
if (srcOrigin != dstOrigin) {
- SkTSwap(dstRect.fTop, dstRect.fBottom);
+ using std::swap;
+ swap(dstRect.fTop, dstRect.fBottom);
}
VkImageBlit blitRegion;