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

Unified Diff: third_party/WebKit/Source/platform/image-decoders/FastSharedBufferReader.h

Issue 1812273003: Eliminate copies of encoded image data (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/FastSharedBufferReader.h
diff --git a/third_party/WebKit/Source/platform/image-decoders/FastSharedBufferReader.h b/third_party/WebKit/Source/platform/image-decoders/FastSharedBufferReader.h
index 7489a35ac5f2c9834f81d334e7aae2585d5c94e5..da7f34473de8574ae113829772fd61b2574a019d 100644
--- a/third_party/WebKit/Source/platform/image-decoders/FastSharedBufferReader.h
+++ b/third_party/WebKit/Source/platform/image-decoders/FastSharedBufferReader.h
@@ -32,7 +32,7 @@
#define FastSharedBufferReader_h
#include "platform/PlatformExport.h"
-#include "platform/SharedBuffer.h"
+#include "platform/image-decoders/SegmentReader.h"
#include "wtf/Allocator.h"
#include "wtf/Noncopyable.h"
#include "wtf/PassRefPtr.h"
@@ -48,9 +48,9 @@ class PLATFORM_EXPORT FastSharedBufferReader final {
DISALLOW_NEW();
WTF_MAKE_NONCOPYABLE(FastSharedBufferReader);
public:
- FastSharedBufferReader(PassRefPtr<SharedBuffer> data);
+ FastSharedBufferReader(PassRefPtr<SegmentReader> data);
- void setData(PassRefPtr<SharedBuffer>);
+ void setData(PassRefPtr<SegmentReader>);
// Returns a consecutive buffer that carries the data starting
// at |dataPosition| with |length| bytes.
@@ -60,7 +60,7 @@ public:
// Caller must ensure there are enough bytes in |m_data| and |buffer|.
const char* getConsecutiveData(size_t dataPosition, size_t length, char* buffer) const;
- // Wraps SharedBuffer::getSomeData().
+ // Wraps SegmentReader::getSomeData().
size_t getSomeData(const char*& someData, size_t dataPosition) const;
// Returns a byte at |dataPosition|.
@@ -76,14 +76,14 @@ public:
}
// This class caches the last access for faster subsequent reads. This
- // method clears that cache in case the SharedBuffer has been modified
+ // method clears that cache in case the SegmentReader has been modified
scroggo_chromium 2016/03/22 20:18:42 This should still say SharedBuffer
scroggo_chromium 2016/03/24 13:59:45 Done.
// (i.e. with mergeSegmentsIntoBuffer).
void clearCache();
private:
void getSomeDataInternal(unsigned dataPosition) const;
- RefPtr<SharedBuffer> m_data;
+ RefPtr<SegmentReader> m_data;
// Caches the last segment of |m_data| accessed, since subsequent reads are
// likely to re-access it.

Powered by Google App Engine
This is Rietveld 408576698