Chromium Code Reviews| Index: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
| diff --git a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
| index ce5a2f5813707ffd96d654517ea30ee105322ddf..d5ab5277587f96862a4b2b085a5f566448a563fa 100644 |
| --- a/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
| +++ b/third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp |
| @@ -162,7 +162,7 @@ void WEBPImageDecoder::clearDecoder() |
| m_frameBackgroundHasAlpha = false; |
| } |
| -void WEBPImageDecoder::onSetData(SharedBuffer*) |
| +void WEBPImageDecoder::onSetData(SegmentReader*) |
| { |
| m_haveAlreadyParsedThisData = false; |
| } |
| @@ -202,7 +202,8 @@ bool WEBPImageDecoder::updateDemuxer() |
| return false; // Await VP8X header so WebPDemuxPartial succeeds. |
| WebPDemuxDelete(m_demux); |
| - WebPData inputData = { reinterpret_cast<const uint8_t*>(m_data->data()), m_data->size() }; |
| + m_encodedData = skia::AdoptRef(m_data->getAsSkData().leakRef()); |
|
Peter Kasting
2016/03/23 02:42:59
Is AdoptRef(leakRef()) really the only way to do t
f(malita)
2016/03/23 16:41:58
If we switch to RefPtr, this should simplify to m_
scroggo_chromium
2016/03/24 13:59:46
Done.
|
| + WebPData inputData = { reinterpret_cast<const uint8_t*>(m_encodedData->data()), m_encodedData->size() }; |
| m_demux = WebPDemuxPartial(&inputData, &m_demuxState); |
| if (!m_demux || (isAllDataReceived() && m_demuxState != WEBP_DEMUX_DONE)) |
| return setFailed(); |