| Index: src/codec/SkBmpCodec.h
|
| diff --git a/src/codec/SkBmpCodec.h b/src/codec/SkBmpCodec.h
|
| index 71006f73153ea3028529b0c51daa999b498bc86e..8a5066b4f49917547176499731c1b6fccab3813f 100644
|
| --- a/src/codec/SkBmpCodec.h
|
| +++ b/src/codec/SkBmpCodec.h
|
| @@ -11,6 +11,7 @@
|
| #include "SkColorTable.h"
|
| #include "SkImageInfo.h"
|
| #include "SkMaskSwizzler.h"
|
| +#include "SkScanlineDecoder.h"
|
| #include "SkStream.h"
|
| #include "SkSwizzler.h"
|
| #include "SkTypes.h"
|
| @@ -31,6 +32,16 @@ public:
|
| };
|
|
|
| /*
|
| + * Used to define the input format of the bmp
|
| + */
|
| + enum BmpInputFormat {
|
| + kStandard_BmpInputFormat,
|
| + kRLE_BmpInputFormat,
|
| + kBitMask_BmpInputFormat,
|
| + kUnknown_BmpInputFormat
|
| + };
|
| +
|
| + /*
|
| * Checks the start of the stream to see if the image is a bmp
|
| */
|
| static bool IsBmp(SkStream*);
|
| @@ -48,10 +59,17 @@ public:
|
| */
|
| static SkCodec* NewFromIco(SkStream*);
|
|
|
| + /*
|
| + * Assumes IsBmp was called and returned true
|
| + * Creates a bmp scanline decoder
|
| + * Takes ownership of the stream
|
| + */
|
| + static SkScanlineDecoder* NewSDFromStream(SkStream* stream);
|
| +
|
| protected:
|
|
|
| - SkBmpCodec(const SkImageInfo& info, SkStream* stream, uint16_t bitsPerPixel,
|
| - RowOrder rowOrder);
|
| + SkBmpCodec(const SkImageInfo& info, SkStream* stream, BmpInputFormat inputFormat,
|
| + uint16_t bitsPerPixel, RowOrder rowOrder);
|
|
|
| SkEncodedFormat onGetEncodedFormat() const override { return kBMP_SkEncodedFormat; }
|
|
|
| @@ -104,8 +122,9 @@ private:
|
| */
|
| static SkCodec* NewFromStream(SkStream*, bool inIco);
|
|
|
| - const uint16_t fBitsPerPixel;
|
| - const RowOrder fRowOrder;
|
| + const BmpInputFormat fInputFormat;
|
| + const uint16_t fBitsPerPixel;
|
| + const RowOrder fRowOrder;
|
|
|
| typedef SkCodec INHERITED;
|
| };
|
|
|