| Index: third_party/WebKit/Source/platform/graphics/ImageSource.cpp
|
| diff --git a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
|
| index 1f98fe0c758eff0810568866402fec5778431fe7..50d5fe282aa1de2d9e0bc7ae06ff4a6533ce53af 100644
|
| --- a/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
|
| +++ b/third_party/WebKit/Source/platform/graphics/ImageSource.cpp
|
| @@ -51,15 +51,16 @@ PassRefPtr<SharedBuffer> ImageSource::data()
|
| return m_decoder ? m_decoder->data() : nullptr;
|
| }
|
|
|
| -void ImageSource::setData(SharedBuffer& data, bool allDataReceived)
|
| +ImageDecoder::SniffResult ImageSource::setData(SharedBuffer& data, bool allDataReceived)
|
| {
|
| - // Create a decoder by sniffing the encoded data. If insufficient data bytes are available to
|
| - // determine the encoded image type, no decoder is created.
|
| + ImageDecoder::SniffResult result = ImageDecoder::determineImageType(data);
|
| if (!m_decoder)
|
| - m_decoder = DeferredImageDecoder::create(data, ImageDecoder::AlphaPremultiplied, ImageDecoder::GammaAndColorProfileApplied);
|
| + m_decoder = DeferredImageDecoder::create(result, ImageDecoder::AlphaPremultiplied, ImageDecoder::GammaAndColorProfileApplied);
|
|
|
| if (m_decoder)
|
| m_decoder->setData(data, allDataReceived);
|
| +
|
| + return result;
|
| }
|
|
|
| String ImageSource::filenameExtension() const
|
|
|