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

Unified Diff: src/codec/SkBmpRLECodec.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/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpRLECodec.cpp
diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
index 14a5b01c1f374d520856058aeef61ef9978324d3..ed0617f2e79050522be70b1bef2dff0a0a3c478d 100644
--- a/src/codec/SkBmpRLECodec.cpp
+++ b/src/codec/SkBmpRLECodec.cpp
@@ -15,19 +15,22 @@
* Creates an instance of the decoder
* Called only by NewFromStream
*/
-SkBmpRLECodec::SkBmpRLECodec(const SkImageInfo& info, SkStream* stream,
- uint16_t bitsPerPixel, uint32_t numColors,
- uint32_t bytesPerColor, uint32_t offset,
- SkBmpCodec::RowOrder rowOrder, size_t RLEBytes)
+SkBmpRLECodec::SkBmpRLECodec(const SkImageInfo& info,
+ SkStream* stream,
+ uint16_t bitsPerPixel,
+ uint32_t numColors,
+ uint32_t bytesPerColor,
+ uint32_t offset,
+ SkBmpCodec::RowOrder rowOrder,
+ size_t RLEBytes)
: INHERITED(info, stream, bitsPerPixel, rowOrder)
, fColorTable(NULL)
, fNumColors(this->computeNumColors(numColors))
, fBytesPerColor(bytesPerColor)
, fOffset(offset)
- , fStreamBuffer(SkNEW_ARRAY(uint8_t, RLEBytes))
+ , fStreamBuffer(new uint8_t[RLEBytes])
, fRLEBytes(RLEBytes)
- , fCurrRLEByte(0)
-{}
+ , fCurrRLEByte(0) {}
/*
* Initiates the bitmap decode
@@ -92,7 +95,7 @@ SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo,
// Read the color table from the stream
colorBytes = fNumColors * fBytesPerColor;
- SkAutoTDeleteArray<uint8_t> cBuffer(SkNEW_ARRAY(uint8_t, colorBytes));
+ SkAutoTDeleteArray<uint8_t> cBuffer(new uint8_t[colorBytes]);
if (stream()->read(cBuffer.get(), colorBytes) != colorBytes) {
SkCodecPrintf("Error: unable to read color table.\n");
return false;
@@ -115,7 +118,7 @@ SkCodec::Result SkBmpRLECodec::onGetPixels(const SkImageInfo& dstInfo,
}
// Set the color table
- fColorTable.reset(SkNEW_ARGS(SkColorTable, (colorTable, maxColors)));
+ fColorTable.reset(new SkColorTable(colorTable, maxColors));
}
// Check that we have not read past the pixel array offset
« no previous file with comments | « src/codec/SkBmpMaskCodec.cpp ('k') | src/codec/SkBmpStandardCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698