Index: src/codec/SkCodec_libpng.cpp |
diff --git a/src/codec/SkCodec_libpng.cpp b/src/codec/SkCodec_libpng.cpp |
index 7d41623a887f2e18a85cd8ff8e962395dced8d57..f4d75561d867f9a2dd7facd5be404701876e4ba1 100644 |
--- a/src/codec/SkCodec_libpng.cpp |
+++ b/src/codec/SkCodec_libpng.cpp |
@@ -287,8 +287,8 @@ static bool read_header(SkStream* stream, png_structp* png_ptrp, |
} |
// Now determine the default SkColorType and SkAlphaType and set required transforms |
- SkColorType skColorType; |
- SkAlphaType skAlphaType; |
+ SkColorType skColorType = kUnknown_SkColorType; |
+ SkAlphaType skAlphaType = kUnknown_SkAlphaType; |
switch (colorType) { |
case PNG_COLOR_TYPE_PALETTE: |
skColorType = kIndex_8_SkColorType; |
@@ -605,8 +605,8 @@ public: |
SkPngScanlineDecoder(const SkImageInfo& srcInfo, SkStream* stream, |
png_structp png_ptr, png_infop info_ptr, int bitDepth) |
: INHERITED(srcInfo, stream, png_ptr, info_ptr, bitDepth, 1) |
- , fSrcRow(nullptr) |
, fAlphaState(kUnknown_AlphaState) |
+ , fSrcRow(nullptr) |
{} |
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options, |
@@ -843,4 +843,3 @@ SkCodec* SkPngCodec::NewFromStream(SkStream* stream) { |
return new SkPngInterlacedScanlineDecoder(imageInfo, streamDeleter.detach(), png_ptr, |
info_ptr, bitDepth, numberPasses); |
} |
- |