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

Unified Diff: src/core/SkPathRef.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/core/SkPaint.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPathRef.cpp
diff --git a/src/core/SkPathRef.cpp b/src/core/SkPathRef.cpp
index 38b4e71cba1d4479eba42c7846ba833f533d0965..e3317a6e7517bfd0ae99824b5f55558f9ad6b7f4 100644
--- a/src/core/SkPathRef.cpp
+++ b/src/core/SkPathRef.cpp
@@ -18,7 +18,7 @@ SkPathRef::Editor::Editor(SkAutoTUnref<SkPathRef>* pathRef,
if ((*pathRef)->unique()) {
(*pathRef)->incReserve(incReserveVerbs, incReservePoints);
} else {
- SkPathRef* copy = SkNEW(SkPathRef);
+ SkPathRef* copy = new SkPathRef;
copy->copy(**pathRef, incReserveVerbs, incReservePoints);
pathRef->reset(copy);
}
@@ -46,7 +46,7 @@ SkPathRef::~SkPathRef() {
// As a template argument, this must have external linkage.
SkPathRef* sk_create_empty_pathref() {
- SkPathRef* empty = SkNEW(SkPathRef);
+ SkPathRef* empty = new SkPathRef;
empty->computeBounds(); // Avoids races later to be the first to do this.
return empty;
}
@@ -71,7 +71,7 @@ void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst,
}
if (!(*dst)->unique()) {
- dst->reset(SkNEW(SkPathRef));
+ dst->reset(new SkPathRef);
}
if (*dst != &src) {
@@ -123,13 +123,13 @@ void SkPathRef::CreateTransformedCopy(SkAutoTUnref<SkPathRef>* dst,
}
SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
- SkPathRef* ref = SkNEW(SkPathRef);
+ SkPathRef* ref = new SkPathRef;
bool isOval;
uint8_t segmentMask;
int32_t packed;
if (!buffer->readS32(&packed)) {
- SkDELETE(ref);
+ delete ref;
return NULL;
}
@@ -142,7 +142,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
!buffer->readS32(&verbCount) ||
!buffer->readS32(&pointCount) ||
!buffer->readS32(&conicCount)) {
- SkDELETE(ref);
+ delete ref;
return NULL;
}
@@ -155,7 +155,7 @@ SkPathRef* SkPathRef::CreateFromBuffer(SkRBuffer* buffer) {
!buffer->read(ref->fPoints, pointCount * sizeof(SkPoint)) ||
!buffer->read(ref->fConicWeights.begin(), conicCount * sizeof(SkScalar)) ||
!buffer->read(&ref->fBounds, sizeof(SkRect))) {
- SkDELETE(ref);
+ delete ref;
return NULL;
}
ref->fBoundsIsDirty = false;
@@ -182,7 +182,7 @@ void SkPathRef::Rewind(SkAutoTUnref<SkPathRef>* pathRef) {
} else {
int oldVCnt = (*pathRef)->countVerbs();
int oldPCnt = (*pathRef)->countPoints();
- pathRef->reset(SkNEW(SkPathRef));
+ pathRef->reset(new SkPathRef);
(*pathRef)->resetToSize(0, 0, 0, oldVCnt, oldPCnt);
}
}
@@ -444,7 +444,7 @@ uint32_t SkPathRef::genID() const {
void SkPathRef::addGenIDChangeListener(GenIDChangeListener* listener) {
if (NULL == listener || this == empty.get()) {
- SkDELETE(listener);
+ delete listener;
return;
}
*fGenIDChangeListeners.append() = listener;
« no previous file with comments | « src/core/SkPaint.cpp ('k') | src/core/SkPicture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698