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

Unified Diff: src/images/SkImageDecoder_libjpeg.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_libico.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/images/SkImageDecoder_libjpeg.cpp
diff --git a/src/images/SkImageDecoder_libjpeg.cpp b/src/images/SkImageDecoder_libjpeg.cpp
index 8e92dd874e18a3ccc64c27e54db9301c2653bf75..d403b7451ddd253ae6f8fab99a47e8efa95efde0 100644
--- a/src/images/SkImageDecoder_libjpeg.cpp
+++ b/src/images/SkImageDecoder_libjpeg.cpp
@@ -210,9 +210,7 @@ public:
fImageHeight = 0;
}
- virtual ~SkJPEGImageDecoder() {
- SkDELETE(fImageIndex);
- }
+ virtual ~SkJPEGImageDecoder() { delete fImageIndex; }
#endif
Format getFormat() const override {
@@ -943,8 +941,7 @@ bool SkJPEGImageDecoder::onDecodeYUV8Planes(SkStream* stream, SkISize componentS
#ifdef SK_BUILD_FOR_ANDROID
bool SkJPEGImageDecoder::onBuildTileIndex(SkStreamRewindable* stream, int *width, int *height) {
-
- SkAutoTDelete<SkJPEGImageIndex> imageIndex(SkNEW_ARGS(SkJPEGImageIndex, (stream, this)));
+ SkAutoTDelete<SkJPEGImageIndex> imageIndex(new SkJPEGImageIndex(stream, this));
skjpeg_error_mgr sk_err;
set_error_mgr(imageIndex->cinfo(), &sk_err);
@@ -1000,7 +997,7 @@ bool SkJPEGImageDecoder::onBuildTileIndex(SkStreamRewindable* stream, int *width
*height = fImageHeight;
}
- SkDELETE(fImageIndex);
+ delete fImageIndex;
fImageIndex = imageIndex.detach();
return true;
@@ -1437,7 +1434,7 @@ static bool is_jpeg(SkStreamRewindable* stream) {
static SkImageDecoder* sk_libjpeg_dfactory(SkStreamRewindable* stream) {
if (is_jpeg(stream)) {
- return SkNEW(SkJPEGImageDecoder);
+ return new SkJPEGImageDecoder;
}
return NULL;
}
@@ -1450,7 +1447,7 @@ static SkImageDecoder::Format get_format_jpeg(SkStreamRewindable* stream) {
}
static SkImageEncoder* sk_libjpeg_efactory(SkImageEncoder::Type t) {
- return (SkImageEncoder::kJPEG_Type == t) ? SkNEW(SkJPEGImageEncoder) : NULL;
+ return (SkImageEncoder::kJPEG_Type == t) ? new SkJPEGImageEncoder : NULL;
}
static SkImageDecoder_DecodeReg gDReg(sk_libjpeg_dfactory);
« no previous file with comments | « src/images/SkImageDecoder_libico.cpp ('k') | src/images/SkImageDecoder_libpng.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698