| Index: src/codec/SkPngCodec.cpp
|
| diff --git a/src/codec/SkPngCodec.cpp b/src/codec/SkPngCodec.cpp
|
| index 8f7ab79bf1f099df265e4c3796425cfa5ea22d6c..0d73ad03f4793a985447c6e26dc5fd5453c1796d 100644
|
| --- a/src/codec/SkPngCodec.cpp
|
| +++ b/src/codec/SkPngCodec.cpp
|
| @@ -818,6 +818,7 @@ bool SkPngCodec::initializeXforms(const SkImageInfo& dstInfo, const Options& opt
|
| // because the interlaced scanline decoder may need to rewind.
|
| fColorXform = nullptr;
|
| SkImageInfo swizzlerInfo = dstInfo;
|
| + Options swizzlerOptions = options;
|
| bool needsColorXform = needs_color_xform(dstInfo, this->getInfo());
|
| if (needsColorXform) {
|
| switch (dstInfo.colorType()) {
|
| @@ -841,6 +842,12 @@ bool SkPngCodec::initializeXforms(const SkImageInfo& dstInfo, const Options& opt
|
| if (!fColorXform && kRGBA_F16_SkColorType == dstInfo.colorType()) {
|
| return false;
|
| }
|
| +
|
| + // When there is a color xform, we swizzle into temporary memory, which is not
|
| + // zero initialized.
|
| + // FIXME (msarett):
|
| + // Is this a problem?
|
| + swizzlerOptions.fZeroInitialized = kNo_ZeroInitialized;
|
| }
|
|
|
| if (SkEncodedInfo::kPalette_Color == this->getEncodedInfo().color()) {
|
| @@ -855,7 +862,7 @@ bool SkPngCodec::initializeXforms(const SkImageInfo& dstInfo, const Options& opt
|
| // Create the swizzler. SkPngCodec retains ownership of the color table.
|
| const SkPMColor* colors = get_color_ptr(fColorTable.get());
|
| fSwizzler.reset(SkSwizzler::CreateSwizzler(this->getEncodedInfo(), colors, swizzlerInfo,
|
| - options));
|
| + swizzlerOptions));
|
| SkASSERT(fSwizzler);
|
| return true;
|
| }
|
|
|