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

Unified Diff: Source/platform/image-decoders/ico/ICOImageDecoder.h

Issue 1259083003: Do not consolidate data in BMPImageDecoder (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@SegmentedBuffer
Patch Set: Do not use a raw pointer Created 5 years, 3 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
« no previous file with comments | « Source/platform/image-decoders/bmp/BMPImageReader.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/image-decoders/ico/ICOImageDecoder.h
diff --git a/Source/platform/image-decoders/ico/ICOImageDecoder.h b/Source/platform/image-decoders/ico/ICOImageDecoder.h
index 93278863c3ad3c8e155070a1aeb4698a555d0a67..d2570c15ddbcbd95b7f4502366c29f7956b034e6 100644
--- a/Source/platform/image-decoders/ico/ICOImageDecoder.h
+++ b/Source/platform/image-decoders/ico/ICOImageDecoder.h
@@ -85,12 +85,14 @@ private:
inline uint16_t readUint16(int offset) const
{
- return BMPImageReader::readUint16(m_data.get(), m_decodedOffset + offset);
+ // TODO (scroggo): This consolidates the data, meaning unnecessary copies.
+ return BMPImageReader::readUint16(&m_data->data()[m_decodedOffset + offset]);
}
inline uint32_t readUint32(int offset) const
{
- return BMPImageReader::readUint32(m_data.get(), m_decodedOffset + offset);
+ // TODO (scroggo): This consolidates the data, meaning unnecessary copies.
+ return BMPImageReader::readUint32(&m_data->data()[m_decodedOffset + offset]);
}
// If the desired PNGImageDecoder exists, gives it the appropriate data.
« no previous file with comments | « Source/platform/image-decoders/bmp/BMPImageReader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698