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

Unified Diff: src/core/SkRecorder.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/SkRecordDraw.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkRecorder.cpp
diff --git a/src/core/SkRecorder.cpp b/src/core/SkRecorder.cpp
index b12b1eb2962e7b9759ceee6b8e9eb1773c63d27b..0fe9e28848f00389c9015855da018b6d96a0fc7e 100644
--- a/src/core/SkRecorder.cpp
+++ b/src/core/SkRecorder.cpp
@@ -27,7 +27,7 @@ SkBigPicture::SnapshotArray* SkDrawableList::newDrawableSnapshot() {
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 @@ void SkRecorder::forgetRecord() {
}
// 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 @@ T* SkRecorder::copy(const T* src) {
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* SkRecorder::copy(const T src[], size_t count) {
}
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::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, const
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);
« no previous file with comments | « src/core/SkRecordDraw.cpp ('k') | src/core/SkResourceCache.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698