| 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 29eefb7ce6fda231c01f26935684a23ac5c31bbf..923cc10e10c22dc32c4cbc64855db08df8d37ece 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/DecodingImageGenerator.cpp
|
| @@ -100,6 +100,26 @@ bool DecodingImageGenerator::onGetPixels(const SkImageInfo& info,
|
| return decoded;
|
| }
|
|
|
| +bool DecodingImageGenerator::onGenerateScaledPixels(
|
| + const SkISize& scaledSize,
|
| + const SkIPoint& subsetOrigin,
|
| + const SkPixmap& subsetPixels,
|
| + SkFilterQuality quality) {
|
| + TRACE_EVENT1("blink", "DecodingImageGenerator::onGenerateScaledPixels",
|
| + "frame index", static_cast<int>(m_frameIndex));
|
| + // TODO(aleksandar.stojiljkovic): sub-rect decoding, see crbug.com/671821.
|
| + if (!subsetOrigin.isZero() || subsetPixels.width() != scaledSize.width() ||
|
| + subsetPixels.height() != subsetPixels.height())
|
| + return false;
|
| + PlatformInstrumentation::willDecodeLazyPixelRef(uniqueID());
|
| + bool decoded = m_frameGenerator->decodeAndScale(
|
| + m_data.get(), m_allDataReceived, m_frameIndex,
|
| + getInfo().makeWH(scaledSize.width(), scaledSize.height()),
|
| + subsetPixels.writable_addr(), subsetPixels.rowBytes(), quality);
|
| + PlatformInstrumentation::didDecodeLazyPixelRef();
|
| + return decoded;
|
| +}
|
| +
|
| bool DecodingImageGenerator::onQueryYUV8(SkYUVSizeInfo* sizeInfo,
|
| SkYUVColorSpace* colorSpace) const {
|
| // YUV decoding does not currently support progressive decoding. See comment
|
|
|