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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp

Issue 1866243003: Revert of Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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/jpeg/JPEGImageDecoder.cpp
diff --git a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
index 09cc8af1ae4938cfd5a1b40fc877a514dc0ee2e2..a89c388b078d78d3507ebafda4a17ee1aa95f2d6 100644
--- a/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
+++ b/third_party/WebKit/Source/platform/image-decoders/jpeg/JPEGImageDecoder.cpp
@@ -362,19 +362,19 @@
return true;
}
- void setData(SegmentReader* data)
+ void setData(SharedBuffer* data)
{
if (m_data.get() == data)
return;
m_data = data;
- // If a restart is needed, the next call to fillBuffer will read from the new SegmentReader.
+ // If a restart is needed, the next call to fillBuffer will read from the new SharedBuffer.
if (m_needsRestart)
return;
// Otherwise, empty the buffer, and leave the position the same, so fillBuffer continues
- // reading from the same position in the new SegmentReader.
+ // reading from the same position in the new SharedBuffer.
m_nextReadPosition -= m_info.src->bytes_in_buffer;
clearBuffer();
}
@@ -638,7 +638,7 @@
m_lastSetByte = nullptr;
}
- RefPtr<SegmentReader> m_data;
+ RefPtr<SharedBuffer> m_data;
JPEGImageDecoder* m_decoder;
// Input reading: True if we need to back up to m_restartPosition.
@@ -724,7 +724,7 @@
return true;
}
-void JPEGImageDecoder::onSetData(SegmentReader* data)
+void JPEGImageDecoder::onSetData(SharedBuffer* data)
{
if (m_reader)
m_reader->setData(data);

Powered by Google App Engine
This is Rietveld 408576698