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

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

Issue 279433002: BMP-in-ICO should respect alpha in Windows V3 32bpp RGB bitmaps. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 7 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 | « no previous file | Source/platform/image-decoders/bmp/BMPImageReader.cpp » ('j') | 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 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
« no previous file with comments | « no previous file | Source/platform/image-decoders/bmp/BMPImageReader.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698