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

Unified Diff: Source/platform/image-decoders/bmp/BMPImageReader.h

Issue 1309363006: Mark FastSharedBufferReader's methods const (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@noConsolidateBMP
Patch Set: 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/FastSharedBufferReader.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/bmp/BMPImageReader.h
diff --git a/Source/platform/image-decoders/bmp/BMPImageReader.h b/Source/platform/image-decoders/bmp/BMPImageReader.h
index 54960edd7a50ea11dce507e9beaafe275931580e..3938b6c53b54694bd53633f20fb64dee06f54463 100644
--- a/Source/platform/image-decoders/bmp/BMPImageReader.h
+++ b/Source/platform/image-decoders/bmp/BMPImageReader.h
@@ -119,19 +119,19 @@ private:
uint8_t rgbRed;
};
- inline uint8_t readUint8(size_t offset)
+ inline uint8_t readUint8(size_t offset) const
{
return m_fastReader.getOneByte(m_decodedOffset + offset);
}
- inline uint16_t readUint16(int offset)
+ inline uint16_t readUint16(int offset) const
{
char buffer[2];
const char* data = m_fastReader.getConsecutiveData(m_decodedOffset + offset, 2, buffer);
return readUint16(data);
}
- inline uint32_t readUint32(int offset)
+ inline uint32_t readUint32(int offset) const
{
char buffer[4];
const char* data = m_fastReader.getConsecutiveData(m_decodedOffset + offset, 4, buffer);
@@ -200,7 +200,7 @@ private:
// row.
// NOTE: Only as many bytes of the return value as are needed to hold
// the pixel data will actually be set.
- inline uint32_t readCurrentPixel(int bytesPerPixel)
+ inline uint32_t readCurrentPixel(int bytesPerPixel) const
{
// We need at most 4 bytes, starting at m_decodedOffset + offset.
char buffer[4];
« no previous file with comments | « Source/platform/image-decoders/FastSharedBufferReader.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698