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

Unified Diff: src/codec/SkJpegCodec.h

Issue 1322623004: Call standard libjpeg/libjpeg-turbo APIs from SkJpegCodec (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Need to save the state, so we can call onGetScaledDimensions before rewinding Created 5 years, 4 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 | « gyp/codec.gyp ('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 ce4fe56d58e552d70d2965e44e5924da4616c455..38e41e757cbe82334cb845d313cc54bd2ede1c68 100644
--- a/src/codec/SkJpegCodec.h
+++ b/src/codec/SkJpegCodec.h
@@ -116,6 +116,9 @@ private:
bool nativelyScaleToDimensions(uint32_t width, uint32_t height);
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;
friend class SkJpegScanlineDecoder;
« no previous file with comments | « gyp/codec.gyp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698