diff options
author | msarett <msarett@google.com> | 2015-08-31 06:55:13 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-31 06:55:13 -0700 |
commit | 5406d6f39ad042e7a0a0d4ea16beca4fe2b66492 (patch) | |
tree | af812bd6efebdd5dfec260883ee9047426011652 /src/codec/SkBmpRLECodec.h | |
parent | 8db52b6367956c22e0cb1be8a9b77b154d21bbf9 (diff) |
Scanline decoding for bmp
Redesigns SkScanlineDecoder.h to indicate the ordering
in which the scanlines are provided
Refactors SkSwizzler::Fill() to include the zeroInit check
and to actually be correct.
BUG=skia:3257
BUG=skia:4198
Review URL: https://codereview.chromium.org/1287423002
Diffstat (limited to 'src/codec/SkBmpRLECodec.h')
-rw-r--r-- | src/codec/SkBmpRLECodec.h | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/codec/SkBmpRLECodec.h b/src/codec/SkBmpRLECodec.h index 65b0180f98..aa5b061273 100644 --- a/src/codec/SkBmpRLECodec.h +++ b/src/codec/SkBmpRLECodec.h @@ -35,9 +35,9 @@ public: * after decoding the headers */ SkBmpRLECodec(const SkImageInfo& srcInfo, SkStream* stream, - uint16_t bitsPerPixel, uint32_t numColors, - uint32_t bytesPerColor, uint32_t offset, - SkBmpCodec::RowOrder rowOrder, size_t RLEBytes); + uint16_t bitsPerPixel, uint32_t numColors, uint32_t bytesPerColor, + uint32_t offset, SkScanlineDecoder::SkScanlineOrder rowOrder, + size_t RLEBytes); protected: @@ -45,6 +45,10 @@ protected: size_t dstRowBytes, const Options&, SkPMColor*, int*) override; + SkCodec::Result prepareToDecode(const SkImageInfo& dstInfo, + const SkCodec::Options& options, SkPMColor inputColorPtr[], + int* inputColorCount) override; + private: /* @@ -77,11 +81,8 @@ private: const SkImageInfo& dstInfo, uint32_t x, uint32_t y, uint8_t red, uint8_t green, uint8_t blue); - /* - * Performs the bitmap decoding for RLE input format - */ - Result decode(const SkImageInfo& dstInfo, void* dst, - size_t dstRowBytes, const Options& opts); + Result decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, + const Options& opts) override; SkAutoTUnref<SkColorTable> fColorTable; // owned const uint32_t fNumColors; @@ -90,6 +91,7 @@ private: SkAutoTDeleteArray<uint8_t> fStreamBuffer; size_t fRLEBytes; uint32_t fCurrRLEByte; + int fSampleX; typedef SkBmpCodec INHERITED; }; |