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

Unified Diff: src/images/SkImageDecoder_libpng.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/images/SkImageDecoder_libjpeg.cpp ('k') | src/images/SkImageDecoder_libwebp.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libpng.cpp
diff --git a/src/images/SkImageDecoder_libpng.cpp b/src/images/SkImageDecoder_libpng.cpp
index 44aa8e2e645d6d3379a175457d6cd6a76ed4fa61..bccdfc8cf5910d06c2e99ce4ef298782563a287e 100644
--- a/src/images/SkImageDecoder_libpng.cpp
+++ b/src/images/SkImageDecoder_libpng.cpp
@@ -85,9 +85,7 @@ public:
return kPNG_Format;
}
- virtual ~SkPNGImageDecoder() {
- SkDELETE(fImageIndex);
- }
+ virtual ~SkPNGImageDecoder() { delete fImageIndex; }
protected:
#ifdef SK_BUILD_FOR_ANDROID
@@ -723,7 +721,7 @@ bool SkPNGImageDecoder::decodePalette(png_structp png_ptr, png_infop info_ptr,
*colorPtr++ = lastColor;
}
- *colorTablep = SkNEW_ARGS(SkColorTable, (colorStorage, colorCount));
+ *colorTablep = new SkColorTable(colorStorage, colorCount);
*reallyHasAlphap = reallyHasAlpha;
return true;
}
@@ -755,9 +753,9 @@ bool SkPNGImageDecoder::onBuildTileIndex(SkStreamRewindable* sk_stream, int *wid
png_build_index(png_ptr);
if (fImageIndex) {
- SkDELETE(fImageIndex);
+ delete fImageIndex;
}
- fImageIndex = SkNEW_ARGS(SkPNGImageIndex, (streamDeleter.detach(), png_ptr, info_ptr));
+ fImageIndex = new SkPNGImageIndex(streamDeleter.detach(), png_ptr, info_ptr);
return true;
}
@@ -1271,7 +1269,7 @@ static bool is_png(SkStreamRewindable* stream) {
SkImageDecoder* sk_libpng_dfactory(SkStreamRewindable* stream) {
if (is_png(stream)) {
- return SkNEW(SkPNGImageDecoder);
+ return new SkPNGImageDecoder;
}
return NULL;
}
@@ -1284,7 +1282,7 @@ static SkImageDecoder::Format get_format_png(SkStreamRewindable* stream) {
}
SkImageEncoder* sk_libpng_efactory(SkImageEncoder::Type t) {
- return (SkImageEncoder::kPNG_Type == t) ? SkNEW(SkPNGImageEncoder) : NULL;
+ return (SkImageEncoder::kPNG_Type == t) ? new SkPNGImageEncoder : NULL;
}
static SkImageDecoder_DecodeReg gDReg(sk_libpng_dfactory);
« no previous file with comments | « src/images/SkImageDecoder_libjpeg.cpp ('k') | src/images/SkImageDecoder_libwebp.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698