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

Unified Diff: src/core/SkBitmapHeap.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/SkBitmapFilter.cpp ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkBitmapHeap.cpp
diff --git a/src/core/SkBitmapHeap.cpp b/src/core/SkBitmapHeap.cpp
index e1d3cae7e7c0e0847cfa21bf73da419006d6052c..5b16d21e3013d8eca770de856fb1765c186a511d 100644
--- a/src/core/SkBitmapHeap.cpp
+++ b/src/core/SkBitmapHeap.cpp
@@ -227,7 +227,7 @@ int SkBitmapHeap::findInLookupTable(const LookupEntry& indexEntry, SkBitmapHeapE
if (index < 0) {
// insert ourselves into the bitmapIndex
index = ~index;
- *fLookupTable.insert(index) = SkNEW_ARGS(LookupEntry, (indexEntry));
+ *fLookupTable.insert(index) = new LookupEntry(indexEntry);
} else if (entry != NULL) {
// populate the entry if needed
*entry = fStorage[fLookupTable[index]->fStorageSlot];
@@ -264,7 +264,7 @@ int SkBitmapHeap::removeEntryFromLookupTable(LookupEntry* entry) {
// a new entry to the lookup table.
SkASSERT(count == fLookupTable.count());
fBytesAllocated -= fStorage[entry->fStorageSlot]->fBytesAllocated;
- SkDELETE(fLookupTable[index]);
+ delete fLookupTable[index];
fLookupTable.remove(index);
return index;
}
@@ -317,7 +317,7 @@ int32_t SkBitmapHeap::insert(const SkBitmap& originalBitmap) {
fUnusedSlots.pop(&slot);
entry = fStorage[slot];
} else {
- entry = SkNEW(SkBitmapHeapEntry);
+ entry = new SkBitmapHeapEntry;
fStorage.append(1, &entry);
entry->fSlot = fStorage.count() - 1;
fBytesAllocated += sizeof(SkBitmapHeapEntry);
@@ -335,14 +335,14 @@ int32_t SkBitmapHeap::insert(const SkBitmap& originalBitmap) {
// if the copy failed then we must abort
if (!copySucceeded) {
// delete the index
- SkDELETE(fLookupTable[searchIndex]);
+ delete fLookupTable[searchIndex];
fLookupTable.remove(searchIndex);
// If entry is the last slot in storage, it is safe to delete it.
if (fStorage.count() - 1 == entry->fSlot) {
// free the slot
fStorage.remove(entry->fSlot);
fBytesAllocated -= sizeof(SkBitmapHeapEntry);
- SkDELETE(entry);
+ delete entry;
} else {
fUnusedSlots.push(entry->fSlot);
}
« no previous file with comments | « src/core/SkBitmapFilter.cpp ('k') | src/core/SkBitmapProcShader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698