| Index: src/codec/SkBmpRLECodec.cpp
|
| diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
|
| index 20661e1c1cf5f0d0373b19e76d29610b9d87d3f0..4a4abe00972abcac485e2e9d6d5733389d4c4d84 100644
|
| --- a/src/codec/SkBmpRLECodec.cpp
|
| +++ b/src/codec/SkBmpRLECodec.cpp
|
| @@ -200,7 +200,7 @@ size_t SkBmpRLECodec::checkForMoreData() {
|
| void SkBmpRLECodec::setPixel(void* dst, size_t dstRowBytes,
|
| const SkImageInfo& dstInfo, uint32_t x, uint32_t y,
|
| uint8_t index) {
|
| - if (is_coord_necessary(x, fSampleX, dstInfo.width())) {
|
| + if (is_coord_necessary(x, fSampleX, this->subsetWidth(), this->subsetLeft())) {
|
| // Set the row
|
| uint32_t row = this->getDstRow(y, dstInfo.height());
|
|
|
| @@ -233,7 +233,7 @@ void SkBmpRLECodec::setRGBPixel(void* dst, size_t dstRowBytes,
|
| const SkImageInfo& dstInfo, uint32_t x,
|
| uint32_t y, uint8_t red, uint8_t green,
|
| uint8_t blue) {
|
| - if (is_coord_necessary(x, fSampleX, dstInfo.width())) {
|
| + if (is_coord_necessary(x, fSampleX, this->subsetWidth(), this->subsetLeft())) {
|
| // Set the row
|
| uint32_t row = this->getDstRow(y, dstInfo.height());
|
|
|
| @@ -277,7 +277,8 @@ SkCodec::Result SkBmpRLECodec::prepareToDecode(const SkImageInfo& dstInfo,
|
| return SkCodec::kInvalidConversion;
|
| }
|
|
|
| - SkScaledCodec::ComputeSampleSize(dstInfo, this->getInfo(), &fSampleX, NULL);
|
| + SkScaledCodec::ComputeSampleSize(dstInfo.dimensions(), this->getInfo().dimensions(), &fSampleX,
|
| + nullptr);
|
|
|
| return SkCodec::kSuccess;
|
| }
|
| @@ -307,7 +308,8 @@ int SkBmpRLECodec::decodeRows(const SkImageInfo& dstInfo, void* dst, size_t dstR
|
| // Because of the need for transparent pixels, kN32 is the only color
|
| // type that makes sense for the destination format.
|
| SkASSERT(kN32_SkColorType == dstInfo.colorType());
|
| - SkSwizzler::Fill(dst, dstInfo, dstRowBytes, SK_ColorTRANSPARENT, opts.fZeroInitialized);
|
| + SkSwizzler::Fill(dst, dstInfo.makeWH(this->subsetWidth(), height), dstRowBytes,
|
| + SK_ColorTRANSPARENT, opts.fZeroInitialized);
|
|
|
| while (true) {
|
| // If we have reached a row that is beyond the requested height, we have
|
|
|