Index: src/codec/SkJpegCodec.cpp |
diff --git a/src/codec/SkJpegCodec.cpp b/src/codec/SkJpegCodec.cpp |
index 5e24b17848339fedfb90b3a0d3c1198bc391849b..858e305b067132b78dd25bd03403090eadd6d2e5 100644 |
--- a/src/codec/SkJpegCodec.cpp |
+++ b/src/codec/SkJpegCodec.cpp |
@@ -11,6 +11,7 @@ |
#include "SkJpegUtility_codec.h" |
#include "SkCodecPriv.h" |
#include "SkColorPriv.h" |
+#include "SkScanlineDecoder.h" |
#include "SkStream.h" |
#include "SkTemplates.h" |
#include "SkTypes.h" |
@@ -407,10 +408,10 @@ public: |
, fCodec(codec) |
{} |
- SkImageGenerator::Result onGetScanlines(void* dst, int count, size_t rowBytes) override { |
+ SkCodec::Result onGetScanlines(void* dst, int count, size_t rowBytes) override { |
// Set the jump location for libjpeg errors |
if (setjmp(fCodec->fDecoderMgr->getJmpBuf())) { |
- return fCodec->fDecoderMgr->returnFailure("setjmp", SkImageGenerator::kInvalidInput); |
+ return fCodec->fDecoderMgr->returnFailure("setjmp", SkCodec::kInvalidInput); |
} |
// Read rows one at a time |
@@ -423,7 +424,7 @@ public: |
SkSwizzler::Fill( |
dstRow, this->dstInfo(), rowBytes, count - y, SK_ColorBLACK, NULL); |
fCodec->fDecoderMgr->dinfo()->output_scanline = this->dstInfo().height(); |
- return SkImageGenerator::kIncompleteInput; |
+ return SkCodec::kIncompleteInput; |
} |
// Convert to RGBA if necessary |
@@ -435,7 +436,7 @@ public: |
dstRow = SkTAddOffset<JSAMPLE>(dstRow, rowBytes); |
} |
- return SkImageGenerator::kSuccess; |
+ return SkCodec::kSuccess; |
} |
#ifndef TURBO_HAS_SKIP |
@@ -447,15 +448,15 @@ public: |
} |
#endif |
- SkImageGenerator::Result onSkipScanlines(int count) override { |
+ SkCodec::Result onSkipScanlines(int count) override { |
// Set the jump location for libjpeg errors |
if (setjmp(fCodec->fDecoderMgr->getJmpBuf())) { |
- return fCodec->fDecoderMgr->returnFailure("setjmp", SkImageGenerator::kInvalidInput); |
+ return fCodec->fDecoderMgr->returnFailure("setjmp", SkCodec::kInvalidInput); |
} |
turbo_jpeg_skip_scanlines(fCodec->fDecoderMgr->dinfo(), count); |
- return SkImageGenerator::kSuccess; |
+ return SkCodec::kSuccess; |
} |
private: |