Index: src/codec/SkJpegCodec.h |
diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h |
index 7eb5100a8fadcfbd811aad5386c13426b56f20cf..7aa275ce4efd6028b69eb48d10de69e8a03a6f9b 100644 |
--- a/src/codec/SkJpegCodec.h |
+++ b/src/codec/SkJpegCodec.h |
@@ -10,7 +10,6 @@ |
#include "SkCodec.h" |
#include "SkColorSpace.h" |
-#include "SkColorSpaceXform.h" |
#include "SkImageInfo.h" |
#include "SkSwizzler.h" |
#include "SkStream.h" |
@@ -100,46 +99,34 @@ |
/* |
* Checks if the conversion between the input image and the requested output |
- * image has been implemented. |
- * |
- * Sets the output color space. |
+ * image has been implemented |
+ * Sets the output color space |
*/ |
- bool setOutputColorSpace(const SkImageInfo& dst, bool needsColorXform); |
+ bool setOutputColorSpace(const SkImageInfo& dst); |
+ // scanline decoding |
void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options); |
- bool initializeColorXform(const SkImageInfo& dstInfo, bool needsColorXform); |
- void allocateStorage(const SkImageInfo& dstInfo); |
- int readRows(const SkImageInfo& dstInfo, void* dst, size_t rowBytes, int count); |
- |
- /* |
- * Scanline decoding. |
- */ |
SkSampler* getSampler(bool createIfNecessary) override; |
Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& options, |
SkPMColor ctable[], int* ctableCount) override; |
int onGetScanlines(void* dst, int count, size_t rowBytes) override; |
bool onSkipScanlines(int count) override; |
- SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; |
- |
+ SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; |
// We will save the state of the decompress struct after reading the header. |
// This allows us to safely call onGetScaledDimensions() at any time. |
- const int fReadyState; |
+ const int fReadyState; |
- |
- SkAutoTMalloc<uint8_t> fStorage; |
- uint8_t* fSwizzleSrcRow; |
- uint32_t* fColorXformSrcRow; |
- |
+ // scanline decoding |
+ SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed |
+ uint8_t* fSrcRow; // Only used if sampling is needed |
// libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo |
// cannot take the exact the subset that we need, we will use the swizzler |
// to further subset the output from libjpeg-turbo. |
- SkIRect fSwizzlerSubset; |
- |
- SkAutoTDelete<SkSwizzler> fSwizzler; |
- std::unique_ptr<SkColorSpaceXform> fColorXform; |
+ SkIRect fSwizzlerSubset; |
+ SkAutoTDelete<SkSwizzler> fSwizzler; |
- sk_sp<SkData> fICCData; |
+ sk_sp<SkData> fICCData; |
typedef SkCodec INHERITED; |
}; |