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

Unified Diff: src/lazy/SkDiscardablePixelRef.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/lazy/SkDiscardableMemoryPool.cpp ('k') | src/opts/SkXfermode_opts.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/lazy/SkDiscardablePixelRef.cpp
diff --git a/src/lazy/SkDiscardablePixelRef.cpp b/src/lazy/SkDiscardablePixelRef.cpp
index 4f9178e6e1e93c11f88db4761faf3e3e0680e182..01bfd83eee25496fe633a5cbb1ff4095fd22637e 100644
--- a/src/lazy/SkDiscardablePixelRef.cpp
+++ b/src/lazy/SkDiscardablePixelRef.cpp
@@ -33,9 +33,9 @@ SkDiscardablePixelRef::~SkDiscardablePixelRef() {
fDiscardableMemory->unlock();
fDiscardableMemoryIsLocked = false;
}
- SkDELETE(fDiscardableMemory);
+ delete fDiscardableMemory;
SkSafeUnref(fDMFactory);
- SkDELETE(fGenerator);
+ delete fGenerator;
}
bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) {
@@ -47,7 +47,7 @@ bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) {
rec->fRowBytes = fRowBytes;
return true;
}
- SkDELETE(fDiscardableMemory);
+ delete fDiscardableMemory;
fDiscardableMemory = NULL;
fDiscardableMemoryIsLocked = false;
}
@@ -74,7 +74,7 @@ bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) {
if (!fGenerator->getPixels(info, pixels, fRowBytes, colors, &colorCount)) {
fDiscardableMemory->unlock();
fDiscardableMemoryIsLocked = false;
- SkDELETE(fDiscardableMemory);
+ delete fDiscardableMemory;
fDiscardableMemory = NULL;
return false;
}
@@ -85,7 +85,7 @@ bool SkDiscardablePixelRef::onNewLockPixels(LockRec* rec) {
// could move it into the block, but then again perhaps it is small enough that this doesn't
// really matter.
if (colorCount > 0) {
- fCTable.reset(SkNEW_ARGS(SkColorTable, (colors, colorCount)));
+ fCTable.reset(new SkColorTable(colors, colorCount));
} else {
fCTable.reset(NULL);
}
@@ -137,8 +137,7 @@ bool SkInstallDiscardablePixelRef(SkImageGenerator* generator, const SkIRect* su
return dst->tryAllocPixels();
}
SkAutoTUnref<SkDiscardablePixelRef> ref(
- SkNEW_ARGS(SkDiscardablePixelRef,
- (prInfo, autoGenerator.detach(), dst->rowBytes(), factory)));
+ new SkDiscardablePixelRef(prInfo, autoGenerator.detach(), dst->rowBytes(), factory));
dst->setPixelRef(ref, origin.x(), origin.y());
return true;
}
« no previous file with comments | « src/lazy/SkDiscardableMemoryPool.cpp ('k') | src/opts/SkXfermode_opts.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698