| Index: third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
|
| index 94ed96346338b246a361d940987693eda8a377da..7eea9d0d0a7f6679f9a518dde94d323748794130 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/gpu/WebGLImageConversion.cpp
|
| @@ -9,6 +9,7 @@
|
| #include "platform/graphics/cpu/arm/WebGLImageConversionNEON.h"
|
| #include "platform/graphics/cpu/x86/WebGLImageConversionSSE.h"
|
| #include "platform/image-decoders/ImageDecoder.h"
|
| +#include "platform/image-decoders/SharedBufferSegmentReader.h"
|
| #include "third_party/skia/include/core/SkImage.h"
|
| #include "wtf/OwnPtr.h"
|
| #include "wtf/PassOwnPtr.h"
|
| @@ -2072,12 +2073,13 @@ void WebGLImageConversion::ImageExtractor::extractImage(bool premultiplyAlpha, b
|
|
|
| if ((!skiaImage || ignoreGammaAndColorProfile || (hasAlpha && !premultiplyAlpha)) && m_image->data()) {
|
| // Attempt to get raw unpremultiplied image data.
|
| + RefPtr<SharedBufferSegmentReader> segmentReader = adoptRef(new SharedBufferSegmentReader(m_image->data()));
|
| OwnPtr<ImageDecoder> decoder(ImageDecoder::create(
|
| - *(m_image->data()), ImageDecoder::AlphaNotPremultiplied,
|
| + *segmentReader.get(), ImageDecoder::AlphaNotPremultiplied,
|
| ignoreGammaAndColorProfile ? ImageDecoder::GammaAndColorProfileIgnored : ImageDecoder::GammaAndColorProfileApplied));
|
| if (!decoder)
|
| return;
|
| - decoder->setData(m_image->data(), true);
|
| + decoder->setData(segmentReader.get(), true);
|
| if (!decoder->frameCount())
|
| return;
|
| ImageFrame* frame = decoder->frameBufferAtIndex(0);
|
|
|