| Index: src/codec/SkJpegCodec.cpp
|
| diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp
|
| index c094d50a3bbac8c7f9239c32c811a95b6b48ebbb..8b8446bac74ced1515830a20795df577c70a3db3 100644
|
| --- a/src/codec/SkJpegCodec.cpp
|
| +++ b/src/codec/SkJpegCodec.cpp
|
| @@ -355,11 +355,8 @@ SkCodec::Result SkJpegCodec::onGetPixels(const SkImageInfo& dstInfo,
|
| // If the destination is kRGB_565, the low 16 bits of SK_ColorBLACK
|
| // will be used. Conveniently, these are zeros, which is the
|
| // representation for black in kRGB_565.
|
| - if (kNo_ZeroInitialized == options.fZeroInitialized ||
|
| - kN32_SkColorType == dstInfo.colorType()) {
|
| - SkSwizzler::Fill(dstRow, dstInfo, dstRowBytes, dstHeight - y,
|
| - SK_ColorBLACK, NULL);
|
| - }
|
| + SkSwizzler::Fill(dstRow, dstInfo, dstRowBytes, dstHeight - y,
|
| + SK_ColorBLACK, NULL, options.fZeroInitialized);
|
|
|
| // Prevent libjpeg from failing on incomplete decode
|
| dinfo->output_scanline = dstHeight;
|
| @@ -516,11 +513,8 @@ public:
|
| uint32_t rowsDecoded =
|
| chromium_jpeg_read_scanlines(fCodec->fDecoderMgr->dinfo(), &dstRow, 1);
|
| if (rowsDecoded != 1) {
|
| - if (SkCodec::kNo_ZeroInitialized == fOpts.fZeroInitialized ||
|
| - kN32_SkColorType == this->dstInfo().colorType()) {
|
| - SkSwizzler::Fill(dstRow, this->dstInfo(), rowBytes,
|
| - count - y, SK_ColorBLACK, NULL);
|
| - }
|
| + SkSwizzler::Fill(dstRow, this->dstInfo(), rowBytes, count - y,
|
| + SK_ColorBLACK, NULL, fOpts.fZeroInitialized);
|
| fCodec->fDecoderMgr->dinfo()->output_scanline = this->dstInfo().height();
|
| return SkCodec::kIncompleteInput;
|
| }
|
|
|