From 9b9497ef14f23562a95afe989d1efe41c603a6f6 Mon Sep 17 00:00:00 2001 From: msarett Date: Thu, 11 Feb 2016 13:29:36 -0800 Subject: Implement onSkipScanlines() for bmp and wbmp TBR=reed@google.com BUG=skia:4270 GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1691083002 Review URL: https://codereview.chromium.org/1691083002 --- src/codec/SkBmpMaskCodec.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'src/codec/SkBmpMaskCodec.cpp') 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; } -- cgit v1.2.3