| Index: src/codec/SkBmpRLECodec.cpp
|
| diff --git a/src/codec/SkBmpRLECodec.cpp b/src/codec/SkBmpRLECodec.cpp
|
| index 14a5b01c1f374d520856058aeef61ef9978324d3..646e20c217cfed21cddfd49fdcc0ea6e9026ef96 100644
|
| --- a/src/codec/SkBmpRLECodec.cpp
|
| +++ b/src/codec/SkBmpRLECodec.cpp
|
| @@ -456,3 +456,24 @@ SkCodec::Result SkBmpRLECodec::decode(const SkImageInfo& dstInfo,
|
| }
|
| }
|
| }
|
| +
|
| +SkCodec::Result SkBmpRLECodec::onStart(const SkImageInfo& dstInfo,
|
| + const SkCodec::Options& options, SkPMColor inputColorPtr[], int* inputColorCount) {
|
| + // Create the color table if necessary and prepare the stream for decode
|
| + // Note that if it is non-NULL, inputColorCount will be modified
|
| + if (!this->createColorTable(inputColorCount)) {
|
| + SkCodecPrintf("Error: could not create color table.\n");
|
| + return SkCodec::kInvalidInput;
|
| + }
|
| +
|
| + // Copy the color table to the client if necessary
|
| + copy_color_table(dstInfo, this->fColorTable, inputColorPtr, inputColorCount);
|
| +
|
| + // Initialize a buffer for encoded RLE data
|
| + if (!this->initializeStreamBuffer()) {
|
| + SkCodecPrintf("Error: cannot initialize swizzler.\n");
|
| + return SkCodec::kInvalidConversion;
|
| + }
|
| +
|
| + return SkCodec::kSuccess;
|
| +}
|
|
|