diff options
Diffstat (limited to 'src/codec/SkIcoCodec.cpp')
-rw-r--r-- | src/codec/SkIcoCodec.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/codec/SkIcoCodec.cpp b/src/codec/SkIcoCodec.cpp index d1cbed0377..cde233a1bd 100644 --- a/src/codec/SkIcoCodec.cpp +++ b/src/codec/SkIcoCodec.cpp @@ -255,8 +255,8 @@ bool SkIcoCodec::onDimensionsSupported(const SkISize& dim) { */ SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes, - const Options& opts, - int* rowsDecoded) { + const Options& opts, SkPMColor* colorTable, + int* colorCount, int* rowsDecoded) { if (opts.fSubset) { // Subsets are not supported. return kUnimplemented; @@ -271,7 +271,7 @@ SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo, } SkCodec* embeddedCodec = fEmbeddedCodecs->operator[](index).get(); - result = embeddedCodec->getPixels(dstInfo, dst, dstRowBytes, &opts); + result = embeddedCodec->getPixels(dstInfo, dst, dstRowBytes, &opts, colorTable, colorCount); switch (result) { case kSuccess: case kIncompleteInput: @@ -292,7 +292,7 @@ SkCodec::Result SkIcoCodec::onGetPixels(const SkImageInfo& dstInfo, } SkCodec::Result SkIcoCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, - const SkCodec::Options& options) { + const SkCodec::Options& options, SkPMColor colorTable[], int* colorCount) { int index = 0; SkCodec::Result result = kInvalidScale; while (true) { @@ -302,7 +302,7 @@ SkCodec::Result SkIcoCodec::onStartScanlineDecode(const SkImageInfo& dstInfo, } SkCodec* embeddedCodec = fEmbeddedCodecs->operator[](index).get(); - result = embeddedCodec->startScanlineDecode(dstInfo, &options); + result = embeddedCodec->startScanlineDecode(dstInfo, &options, colorTable, colorCount); if (kSuccess == result) { fCurrScanlineCodec = embeddedCodec; fCurrIncrementalCodec = nullptr; @@ -327,7 +327,8 @@ bool SkIcoCodec::onSkipScanlines(int count) { } SkCodec::Result SkIcoCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo, - void* pixels, size_t rowBytes, const SkCodec::Options& options) { + void* pixels, size_t rowBytes, const SkCodec::Options& options, + SkPMColor* colorTable, int* colorCount) { int index = 0; while (true) { index = this->chooseCodec(dstInfo.dimensions(), index); @@ -337,7 +338,7 @@ SkCodec::Result SkIcoCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo, SkCodec* embeddedCodec = fEmbeddedCodecs->operator[](index).get(); switch (embeddedCodec->startIncrementalDecode(dstInfo, - pixels, rowBytes, &options)) { + pixels, rowBytes, &options, colorTable, colorCount)) { case kSuccess: fCurrIncrementalCodec = embeddedCodec; fCurrScanlineCodec = nullptr; @@ -355,7 +356,8 @@ SkCodec::Result SkIcoCodec::onStartIncrementalDecode(const SkImageInfo& dstInfo, // valid for scanline decoding. // Once BMP supports incremental decoding this workaround can go // away. - if (embeddedCodec->startScanlineDecode(dstInfo) == kSuccess) { + if (embeddedCodec->startScanlineDecode(dstInfo, nullptr, + colorTable, colorCount) == kSuccess) { return kUnimplemented; } // Move on to the next embedded codec. |