Index: src/codec/SkBmpCodec.cpp |
diff --git a/src/codec/SkBmpCodec.cpp b/src/codec/SkBmpCodec.cpp |
index 406a603dceefe3916714cb9cf394baefac094d00..2de63b8a1db7507638b06978d3dadf123bf1db99 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,10 @@ public: |
return fCodec->fRowOrder; |
} |
- int onGetY() const override { |
- return fCodec->getDstRow(this->INHERITED::onGetY(), 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; |
}; |