Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1220)

Unified Diff: third_party/WebKit/Source/platform/image-decoders/webp/WEBPImageDecoder.cpp

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a leak; remove unnecessary comments Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..d85d5fef5d3e10be19512538d9ac9f7bcc5a88a5 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 = m_data->getAsSkData();
+ 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();

Powered by Google App Engine
This is Rietveld 408576698