Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Unified Diff: src/codec/SkJpegCodec.h

Issue 1092303003: Scanline decoding for jpeg (Closed) Base URL: https://skia.googlesource.com/skia.git@index-scanline
Patch Set: Return a reference to ImageInfo Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/codec/SkScanlineDecoder.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/codec/SkJpegCodec.h
diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h
index 51a741a525aa0936442aa7ac50c179f6e07db5fb..3447a10f39735efcb2a97db1a549982e2f05d199 100644
--- a/src/codec/SkJpegCodec.h
+++ b/src/codec/SkJpegCodec.h
@@ -56,6 +56,9 @@ protected:
return kJPEG_SkEncodedFormat;
}
+ SkScanlineDecoder* onGetScanlineDecoder(const SkImageInfo& dstInfo, const Options& options,
+ SkPMColor ctable[], int* ctableCount) override;
+
private:
/*
@@ -91,7 +94,28 @@ private:
*/
SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* decoderMgr);
+ /*
+ * Handles rewinding the input stream if it is necessary
+ */
+ bool handleRewind();
+
+ /*
+ * Checks if we can scale to the requested dimensions and scales the dimensions
+ * if possible
+ */
+ bool scaleToDimensions(uint32_t width, uint32_t height);
+
+ /*
+ * Create the swizzler based on the encoded format
+ */
+ void initializeSwizzler(const SkImageInfo& dstInfo, void* dst, size_t dstRowBytes,
+ const Options& options);
+
SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
+ SkAutoTDelete<SkSwizzler> fSwizzler;
+ size_t fSrcRowBytes;
+
+ friend class SkJpegScanlineDecoder;
typedef SkCodec INHERITED;
};
« no previous file with comments | « include/codec/SkScanlineDecoder.h ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698