| Index: include/codec/SkScanlineDecoder.h
|
| diff --git a/include/codec/SkScanlineDecoder.h b/include/codec/SkScanlineDecoder.h
|
| index eac31ef40f05ca28b838c4031b037f8c3e979c6e..942c1b986ff4e33a939da8497e4b3bb27d81a061 100644
|
| --- a/include/codec/SkScanlineDecoder.h
|
| +++ b/include/codec/SkScanlineDecoder.h
|
| @@ -9,8 +9,8 @@
|
| #define SkScanlineDecoder_DEFINED
|
|
|
| #include "SkTypes.h"
|
| +#include "SkCodec.h"
|
| #include "SkTemplates.h"
|
| -#include "SkImageGenerator.h"
|
| #include "SkImageInfo.h"
|
|
|
| class SkScanlineDecoder : public SkNoncopyable {
|
| @@ -40,12 +40,12 @@ public:
|
| * @param rowBytes Number of bytes per row. Must be large enough to hold
|
| * a scanline based on the SkImageInfo used to create this object.
|
| */
|
| - SkImageGenerator::Result getScanlines(void* dst, int countLines, size_t rowBytes) {
|
| + SkCodec::Result getScanlines(void* dst, int countLines, size_t rowBytes) {
|
| if ((rowBytes < fDstInfo.minRowBytes() && countLines > 1 ) || countLines <= 0
|
| || fCurrScanline + countLines > fDstInfo.height()) {
|
| - return SkImageGenerator::kInvalidParameters;
|
| + return SkCodec::kInvalidParameters;
|
| }
|
| - const SkImageGenerator::Result result = this->onGetScanlines(dst, countLines, rowBytes);
|
| + const SkCodec::Result result = this->onGetScanlines(dst, countLines, rowBytes);
|
| fCurrScanline += countLines;
|
| return result;
|
| }
|
| @@ -58,14 +58,14 @@ public:
|
| * will make reallyHasAlpha return true, when it could have returned
|
| * false.
|
| */
|
| - SkImageGenerator::Result skipScanlines(int countLines) {
|
| + SkCodec::Result skipScanlines(int countLines) {
|
| if (fCurrScanline + countLines > fDstInfo.height()) {
|
| // Arguably, we could just skip the scanlines which are remaining,
|
| // and return kSuccess. We choose to return invalid so the client
|
| // can catch their bug.
|
| - return SkImageGenerator::kInvalidParameters;
|
| + return SkCodec::kInvalidParameters;
|
| }
|
| - const SkImageGenerator::Result result = this->onSkipScanlines(countLines);
|
| + const SkCodec::Result result = this->onSkipScanlines(countLines);
|
| fCurrScanline += countLines;
|
| return result;
|
| }
|
| @@ -96,7 +96,7 @@ private:
|
| int fCurrScanline;
|
|
|
| // Naive default version just calls onGetScanlines on temp memory.
|
| - virtual SkImageGenerator::Result onSkipScanlines(int countLines) {
|
| + virtual SkCodec::Result onSkipScanlines(int countLines) {
|
| SkAutoMalloc storage(fDstInfo.minRowBytes());
|
| // Note that we pass 0 to rowBytes so we continue to use the same memory.
|
| // Also note that while getScanlines checks that rowBytes is big enough,
|
| @@ -106,7 +106,7 @@ private:
|
| return this->onGetScanlines(storage.get(), countLines, 0);
|
| }
|
|
|
| - virtual SkImageGenerator::Result onGetScanlines(void* dst, int countLines,
|
| + virtual SkCodec::Result onGetScanlines(void* dst, int countLines,
|
| size_t rowBytes) = 0;
|
|
|
| };
|
|
|