Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(244)

Unified Diff: src/gpu/GrTessellatingPathRenderer.cpp

Issue 1316123003: Style Change: SkNEW->new; SkDELETE->delete (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2015-08-26 (Wednesday) 15:59:00 EDT Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrTessellatingPathRenderer.cpp
diff --git a/src/gpu/GrTessellatingPathRenderer.cpp b/src/gpu/GrTessellatingPathRenderer.cpp
index 9fe5278b42899236280bdc066c49da454612b0b2..55af04480a0c98684354280891e7f432dba06d58 100644
--- a/src/gpu/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/GrTessellatingPathRenderer.cpp
@@ -89,8 +89,7 @@
#define LOG(...)
#endif
-#define ALLOC_NEW(Type, args, alloc) \
- SkNEW_PLACEMENT_ARGS(alloc.allocThrow(sizeof(Type)), Type, args)
+#define ALLOC_NEW(Type, args, alloc) new (alloc.allocThrow(sizeof(Type))) Type args
namespace {
@@ -1392,7 +1391,7 @@ public:
const GrStrokeInfo& stroke,
const SkMatrix& viewMatrix,
SkRect clipBounds) {
- return SkNEW_ARGS(TessellatingPathBatch, (color, path, stroke, viewMatrix, clipBounds));
+ return new TessellatingPathBatch(color, path, stroke, viewMatrix, clipBounds);
}
const char* name() const override { return "TessellatingPathBatch"; }
@@ -1461,7 +1460,7 @@ private:
}
LOG("got %d pts, %d contours\n", maxPts, contourCnt);
- SkAutoTDeleteArray<Vertex*> contours(SkNEW_ARRAY(Vertex *, contourCnt));
+ SkAutoTDeleteArray<Vertex*> contours(new Vertex* [contourCnt]);
// For the initial size of the chunk allocator, estimate based on the point count:
// one vertex per point for the initial passes, plus two for the vertices in the
@@ -1495,7 +1494,7 @@ private:
if (canMapVB) {
verts = static_cast<SkPoint*>(vertexBuffer->map());
} else {
- verts = SkNEW_ARRAY(SkPoint, count);
+ verts = new SkPoint[count];
}
SkPoint* end = polys_to_triangles(polys, fillType, verts);
int actualCount = static_cast<int>(end - verts);
@@ -1505,7 +1504,7 @@ private:
vertexBuffer->unmap();
} else {
vertexBuffer->updateData(verts, actualCount * sizeof(SkPoint));
- SkDELETE_ARRAY(verts);
+ delete[] verts;
}
@@ -1516,7 +1515,7 @@ private:
SkAutoTUnref<SkData> data(SkData::NewWithCopy(&info, sizeof(info)));
key->setCustomData(data.get());
resourceProvider->assignUniqueKeyToResource(*key, vertexBuffer.get());
- SkPathPriv::AddGenIDChangeListener(fPath, SkNEW(PathInvalidator(*key)));
+ SkPathPriv::AddGenIDChangeListener(fPath, new PathInvalidator(*key));
}
return actualCount;
}
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/GrTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698