| Index: third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
| index afc8818abafa95723c4c0ecb54651a91fea80c50..274cbb2adbcc4ac4cfbfea5b7c049e00f2aabf1a 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
| @@ -70,7 +70,7 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info, void* pixels,
|
| }
|
|
|
| PlatformInstrumentation::willDecodeLazyPixelRef(m_generationId);
|
| - bool decoded = m_frameGenerator->decodeAndScale(getInfo(), m_frameIndex, pixels, rowBytes);
|
| + bool decoded = m_frameGenerator->decodeAndScale(info, m_frameIndex, pixels, rowBytes, table, tableCount);
|
| PlatformInstrumentation::didDecodeLazyPixelRef();
|
|
|
| return decoded;
|
| @@ -113,7 +113,9 @@ SkImageGenerator* DecodingImageGenerator::create(SkData* data)
|
| return 0;
|
|
|
| const IntSize size = decoder->size();
|
| - const SkImageInfo info = SkImageInfo::MakeN32Premul(size.width(), size.height());
|
| + const SkImageInfo info = decoder->canDecodeTo(0, ImageFrame::Index8)
|
| + ? SkImageInfo::Make(size.width(), size.height(), kIndex_8_SkColorType, kPremul_SkAlphaType)
|
| + : SkImageInfo::MakeN32Premul(size.width(), size.height());
|
|
|
| RefPtr<ImageFrameGenerator> frame = ImageFrameGenerator::create(SkISize::Make(size.width(), size.height()), buffer, true, false);
|
| if (!frame)
|
|
|