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

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: 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
Index: src/codec/SkJpegCodec.h
diff --git a/src/codec/SkJpegCodec.h b/src/codec/SkJpegCodec.h
index 51a741a525aa0936442aa7ac50c179f6e07db5fb..f75d16cd2e5c81840632fc5b3a38674e8d909bb7 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,27 @@ 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 performs the scaling
scroggo 2015/04/24 13:14:28 This doesn't actually scale, right? It just sets u
msarett 2015/04/24 15:08:44 Yes this is unclear. I changed the function name
+ */
+ bool handleScaling(const SkImageInfo& dstInfo);
+
+ /*
+ * 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;
};

Powered by Google App Engine
This is Rietveld 408576698