| Index: src/codec/SkBmpCodec.cpp
|
| diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp
|
| index 406a603dceefe3916714cb9cf394baefac094d00..27010fabc00c518311b84879819ab54f8f813fb8 100644
|
| --- a/src/codec/SkBmpCodec.cpp
|
| +++ b/src/codec/SkBmpCodec.cpp
|
| @@ -556,9 +556,9 @@ int32_t SkBmpCodec::getDstRow(int32_t y, int32_t height) {
|
| * we start filling from where we left off, but for kBottomUp we start
|
| * filling at the top of the image.
|
| */
|
| -void* SkBmpCodec::getDstStartRow(void* dst, size_t dstRowBytes, int32_t y) const {
|
| +void* SkBmpCodec::onGetFillDst(void* dst, size_t dstRowBytes, uint32_t decodedScanlines) const {
|
| return (SkScanlineDecoder::kTopDown_SkScanlineOrder == fRowOrder) ?
|
| - SkTAddOffset<void*>(dst, y * dstRowBytes) : dst;
|
| + INHERITED::onGetFillDst(dst, dstRowBytes, decodedScanlines) : dst;
|
| }
|
|
|
| /*
|
| @@ -580,7 +580,7 @@ uint32_t SkBmpCodec::computeNumColors(uint32_t numColors) {
|
| class SkBmpScanlineDecoder : public SkScanlineDecoder {
|
| public:
|
| SkBmpScanlineDecoder(SkBmpCodec* codec)
|
| - : INHERITED(codec->getInfo())
|
| + : INHERITED(codec, codec->getInfo())
|
| , fCodec(codec)
|
| {}
|
|
|
| @@ -610,7 +610,7 @@ public:
|
| return fCodec->prepareToDecode(dstInfo, options, inputColorPtr, inputColorCount);
|
| }
|
|
|
| - SkCodec::Result onGetScanlines(void* dst, int count, size_t rowBytes) override {
|
| + uint32_t onGetScanlines(void* dst, int count, size_t rowBytes) override {
|
| // Create a new image info representing the portion of the image to decode
|
| SkImageInfo rowInfo = this->dstInfo().makeWH(this->dstInfo().width(), count);
|
|
|
| @@ -622,14 +622,14 @@ public:
|
| return fCodec->fRowOrder;
|
| }
|
|
|
| - int onGetY() const override {
|
| - return fCodec->getDstRow(this->INHERITED::onGetY(), this->dstInfo().height());
|
| + int onGetY(int encodedY) const override {
|
| + return fCodec->getDstRow(encodedY, this->dstInfo().height());
|
| }
|
|
|
| // TODO(msarett): Override default skipping with something more clever.
|
|
|
| private:
|
| - SkAutoTDelete<SkBmpCodec> fCodec;
|
| + SkBmpCodec* fCodec; // Owned by parent class
|
|
|
| typedef SkScanlineDecoder INHERITED;
|
| };
|
|
|