Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(154)

Unified Diff: src/codec/SkBmpMaskCodec.cpp

Issue 1691083002: Implement onSkipScanlines() for bmp and wbmp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/codec/SkBmpMaskCodec.h ('k') | src/codec/SkBmpRLECodec.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkBmpMaskCodec.cpp
diff --git a/src/codec/SkBmpMaskCodec.cpp b/src/codec/SkBmpMaskCodec.cpp
index b173317c10a53ef9bee10721978e2b403080ad11..b603de9a03f81fd47b13f26dc234cb4b636c78fa 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;
}
« no previous file with comments | « src/codec/SkBmpMaskCodec.h ('k') | src/codec/SkBmpRLECodec.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698