aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkBmpMaskCodec.h
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2015-08-31 06:55:13 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-08-31 06:55:13 -0700
commit5406d6f39ad042e7a0a0d4ea16beca4fe2b66492 (patch)
treeaf812bd6efebdd5dfec260883ee9047426011652 /src/codec/SkBmpMaskCodec.h
parent8db52b6367956c22e0cb1be8a9b77b154d21bbf9 (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/SkBmpMaskCodec.h')
-rw-r--r--src/codec/SkBmpMaskCodec.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/codec/SkBmpMaskCodec.h b/src/codec/SkBmpMaskCodec.h
index 6f43bb3f85..58b2e6b507 100644
--- a/src/codec/SkBmpMaskCodec.h
+++ b/src/codec/SkBmpMaskCodec.h
@@ -29,7 +29,8 @@ public:
* @param rowOrder indicates whether rows are ordered top-down or bottom-up
*/
SkBmpMaskCodec(const SkImageInfo& srcInfo, SkStream* stream,
- uint16_t bitsPerPixel, SkMasks* masks, RowOrder rowOrder);
+ uint16_t bitsPerPixel, SkMasks* masks,
+ SkScanlineDecoder::SkScanlineOrder rowOrder);
protected:
@@ -37,15 +38,20 @@ 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:
bool initializeSwizzler(const SkImageInfo& dstInfo);
- 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;
SkAutoTDelete<SkMasks> fMasks; // owned
SkAutoTDelete<SkMaskSwizzler> fMaskSwizzler;
+ const size_t fSrcRowBytes;
SkAutoTDeleteArray<uint8_t> fSrcBuffer;
typedef SkBmpCodec INHERITED;