aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/codec/SkBmpMaskCodec.cpp
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-02-11 13:29:36 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2016-02-11 13:29:36 -0800
commit9b9497ef14f23562a95afe989d1efe41c603a6f6 (patch)
tree73bcf52cd5174899c13c816d02092faccdc8453d /src/codec/SkBmpMaskCodec.cpp
parentf8289d9bd1faff400728cb8e1ac0b1aa68bfbc32 (diff)
Implement onSkipScanlines() for bmp and wbmp
Diffstat (limited to 'src/codec/SkBmpMaskCodec.cpp')
-rw-r--r--src/codec/SkBmpMaskCodec.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/codec/SkBmpMaskCodec.cpp b/src/codec/SkBmpMaskCodec.cpp
index b173317c10..b603de9a03 100644
--- a/src/codec/SkBmpMaskCodec.cpp
+++ b/src/codec/SkBmpMaskCodec.cpp
@@ -18,8 +18,7 @@ SkBmpMaskCodec::SkBmpMaskCodec(const SkImageInfo& info, SkStream* stream,
: INHERITED(info, stream, bitsPerPixel, rowOrder)
, fMasks(masks)
, fMaskSwizzler(nullptr)
- , fSrcRowBytes(SkAlign4(compute_row_bytes(this->getInfo().width(), this->bitsPerPixel())))
- , fSrcBuffer(new uint8_t [fSrcRowBytes])
+ , fSrcBuffer(new uint8_t [this->srcRowBytes()])
{}
/*
@@ -92,7 +91,7 @@ int SkBmpMaskCodec::decodeRows(const SkImageInfo& dstInfo,
const int height = dstInfo.height();
for (int y = 0; y < height; y++) {
// Read a row of the input
- if (this->stream()->read(srcRow, fSrcRowBytes) != fSrcRowBytes) {
+ if (this->stream()->read(srcRow, this->srcRowBytes()) != this->srcRowBytes()) {
SkCodecPrintf("Warning: incomplete input stream.\n");
return y;
}