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 1c440eecc9b71738cfd64091f63084cd9cbc6a2f..664dab6170fee9430115f99d8623139fd4eece1d 100644 |
--- a/Source/platform/image-decoders/bmp/BMPImageReader.h |
+++ b/Source/platform/image-decoders/bmp/BMPImageReader.h |
@@ -68,7 +68,7 @@ public: |
// |startOffset| points to the start of the BMP within the file. |
// |buffer| points at an empty ImageFrame that we'll initialize and |
// fill with decoded data. |
- BMPImageReader(ImageDecoder* parent, size_t decodedAndHeaderOffset, size_t imgDataOffset, bool usesAndMask); |
+ BMPImageReader(ImageDecoder* parent, size_t decodedAndHeaderOffset, size_t imgDataOffset, bool m_isInICO); |
Stephen White
2014/05/07 22:38:55
Spurious m_.
Peter Kasting
2014/05/07 22:41:29
Darn! Good catch. Will fix.
|
void setBuffer(ImageFrame* buffer) { m_buffer = buffer; } |
void setData(SharedBuffer* data) { m_data = data; } |
@@ -94,11 +94,6 @@ private: |
HUFFMAN1D, // Stored in file as 3 |
RLE24, // Stored in file as 4 |
}; |
- enum AndMaskState { |
- None, |
- NotYetDecoded, |
- Decoding, |
- }; |
enum ProcessingResult { |
Success, |
Failure, |
@@ -343,11 +338,15 @@ private: |
bool m_seenNonZeroAlphaPixel; |
bool m_seenZeroAlphaPixel; |
+ // BMPs-in-ICOs have a few differences from standalone BMPs, so we need to |
+ // know if we're in an ICO container. |
+ bool m_isInICO; |
+ |
// ICOs store a 1bpp "mask" immediately after the main bitmap image data |
// (and, confusingly, add its height to the biHeight value in the info |
- // header, thus doubling it). This variable tracks whether we have such |
- // a mask and if we've started decoding it yet. |
- AndMaskState m_andMaskState; |
+ // header, thus doubling it). If |m_isInICO| is true, this variable tracks |
+ // whether we've begun decoding this mask yet. |
+ bool m_decodingAndMask; |
}; |
} // namespace WebCore |