Chromium Code Reviews| Index: src/codec/SkCodec_libbmp.h |
| diff --git a/src/codec/SkCodec_libbmp.h b/src/codec/SkCodec_libbmp.h |
| index e6620d275d538558b595c561a2ef4deffaf8a38c..5b76ff1e749b5bd3972a7a71c33556b8e1cf4ee3 100644 |
| --- a/src/codec/SkCodec_libbmp.h |
| +++ b/src/codec/SkCodec_libbmp.h |
| @@ -35,7 +35,7 @@ public: |
| /* |
| * |
| - * Checks the start of the stream to see if the image is a bitmap |
| + * Checks the start of the stream to see if the image is a bmp |
| * |
| */ |
| static bool IsBmp(SkStream*); |
| @@ -43,17 +43,25 @@ public: |
| /* |
| * |
| * Assumes IsBmp was called and returned true |
| - * Creates a bitmap decoder |
| + * Creates a bmp decoder |
| * Reads enough of the stream to determine the image format |
| * |
| */ |
| static SkCodec* NewFromStream(SkStream*); |
| + /* |
| + * |
| + * Creates a bmp decoder for a bmp embedded in ico |
| + * Reads enough of the stream to determine the image format |
| + * |
| + */ |
| + static SkCodec* NewFromIco(SkStream*); |
| + |
| protected: |
| /* |
| * |
| - * Initiates the bitmap decode |
| + * Initiates the bmp decode |
| * |
| */ |
| virtual Result onGetPixels(const SkImageInfo& dstInfo, void* dst, |
| @@ -64,7 +72,7 @@ private: |
| /* |
| * |
| - * Used to define the input format of the bitmap |
| + * Used to define the input format of the bmp |
| * |
| */ |
| enum BitmapInputFormat { |
| @@ -83,6 +91,14 @@ private: |
| /* |
| * |
| + * Creates a bmp decoder |
| + * Reads enough of the stream to determine the image format |
| + * |
| + */ |
| + static SkCodec* NewFromStream(SkStream*, const bool isIco); |
| + |
| + /* |
| + * |
| * Performs the bitmap decoding for bit masks input format |
| * |
| */ |
| @@ -147,7 +163,8 @@ private: |
| SkBmpCodec(const SkImageInfo& srcInfo, SkStream* stream, |
| uint16_t bitsPerPixel, BitmapInputFormat format, |
| SkMasks* masks, uint32_t numColors, uint32_t bytesPerColor, |
| - uint32_t offset, RowOrder rowOrder, size_t RLEByes); |
| + uint32_t offset, RowOrder rowOrder, size_t RLEBytes, |
| + const bool isIco); |
|
scroggo
2015/03/23 13:41:24
nit: We typically do not use const for primitive p
msarett
2015/03/23 19:40:02
Sorry I feel like I keep reintroducing this.
|
| // Fields |
| const uint16_t fBitsPerPixel; |
| @@ -159,6 +176,7 @@ private: |
| const uint32_t fOffset; |
| const RowOrder fRowOrder; |
| const size_t fRLEBytes; |
| + const bool fIsIco; |
| typedef SkCodec INHERITED; |
| }; |