Style Change: SkNEW->new; SkDELETE->delete
DOCS_PREVIEW= https://skia.org/?cl=1316123003
Review URL: https://codereview.chromium.org/1316123003
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index b12b1eb..0fe9e28 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -27,7 +27,7 @@
for (int i = 0; i < count; ++i) {
pics[i] = fArray[i]->newPictureSnapshot();
}
- return SkNEW_ARGS(SkBigPicture::SnapshotArray, (pics.detach(), count));
+ return new SkBigPicture::SnapshotArray(pics.detach(), count);
}
void SkDrawableList::append(SkDrawable* drawable) {
@@ -66,9 +66,11 @@
}
// To make appending to fRecord a little less verbose.
-#define APPEND(T, ...) \
- if (fMiniRecorder) { this->flushMiniRecorder(); } \
- SkNEW_PLACEMENT_ARGS(fRecord->append<SkRecords::T>(), SkRecords::T, (__VA_ARGS__))
+#define APPEND(T, ...) \
+ if (fMiniRecorder) { \
+ this->flushMiniRecorder(); \
+ } \
+ new (fRecord->append<SkRecords::T>()) SkRecords::T(__VA_ARGS__)
#define TRY_MINIRECORDER(method, ...) \
if (fMiniRecorder && fMiniRecorder->method(__VA_ARGS__)) { return; }
@@ -83,7 +85,7 @@
if (NULL == src) {
return NULL;
}
- return SkNEW_PLACEMENT_ARGS(fRecord->alloc<T>(), T, (*src));
+ return new (fRecord->alloc<T>()) T(*src);
}
// This copy() is for arrays.
@@ -95,7 +97,7 @@
}
T* dst = fRecord->alloc<T>(count);
for (size_t i = 0; i < count; i++) {
- SkNEW_PLACEMENT_ARGS(dst + i, T, (src[i]));
+ new (dst + i) T(src[i]);
}
return dst;
}
@@ -157,7 +159,7 @@
void SkRecorder::onDrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) {
if (!fDrawableList) {
- fDrawableList.reset(SkNEW(SkDrawableList));
+ fDrawableList.reset(new SkDrawableList);
}
fDrawableList->append(drawable);
APPEND(DrawDrawable, this->copy(matrix), drawable->getBounds(), fDrawableList->count() - 1);