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

Side by Side Diff: src/codec/SkJpegCodec.h

Issue 1719073002: Use new jpeg_crop_scanlines() API to optimize jpeg subset decodes (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Add to assert Created 4 years, 10 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 unified diff | Download patch
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2015 Google Inc. 2 * Copyright 2015 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef SkJpegCodec_DEFINED 8 #ifndef SkJpegCodec_DEFINED
9 #define SkJpegCodec_DEFINED 9 #define SkJpegCodec_DEFINED
10 10
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 bool onSkipScanlines(int count) override; 108 bool onSkipScanlines(int count) override;
109 109
110 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; 110 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr;
111 // We will save the state of the decompress struct after reading the header. 111 // We will save the state of the decompress struct after reading the header.
112 // This allows us to safely call onGetScaledDimensions() at any time. 112 // This allows us to safely call onGetScaledDimensions() at any time.
113 const int fReadyState; 113 const int fReadyState;
114 114
115 // scanline decoding 115 // scanline decoding
116 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed 116 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed
117 uint8_t* fSrcRow; // Only used if sampling is needed 117 uint8_t* fSrcRow; // Only used if sampling is needed
118 // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo
119 // cannot take the exact the subset that we need, we will use the swizzler
120 // to further subset the output from libjpeg-turbo.
121 SkIRect fSwizzlerSubset;
118 SkAutoTDelete<SkSwizzler> fSwizzler; 122 SkAutoTDelete<SkSwizzler> fSwizzler;
119 123
120 typedef SkCodec INHERITED; 124 typedef SkCodec INHERITED;
121 }; 125 };
122 126
123 #endif 127 #endif
OLDNEW
« no previous file with comments | « src/codec/SkCodec.cpp ('k') | src/codec/SkJpegCodec.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698