| OLD | NEW |
| 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 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 bool onSkipScanlines(int count) override; | 107 bool onSkipScanlines(int count) override; |
| 108 | 108 |
| 109 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; | 109 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; |
| 110 // We will save the state of the decompress struct after reading the header. | 110 // We will save the state of the decompress struct after reading the header. |
| 111 // This allows us to safely call onGetScaledDimensions() at any time. | 111 // This allows us to safely call onGetScaledDimensions() at any time. |
| 112 const int fReadyState; | 112 const int fReadyState; |
| 113 | 113 |
| 114 // scanline decoding | 114 // scanline decoding |
| 115 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed | 115 SkAutoTMalloc<uint8_t> fStorage; // Only used if sampling is needed |
| 116 uint8_t* fSrcRow; // Only used if sampling is needed | 116 uint8_t* fSrcRow; // Only used if sampling is needed |
| 117 // libjpeg-turbo provides some subsetting. In the case that libjpeg-turbo |
| 118 // cannot take the exact the subset that we need, we will use the swizzler |
| 119 // to further subset the output from libjpeg-turbo. |
| 120 SkIRect fSwizzlerSubset; |
| 117 SkAutoTDelete<SkSwizzler> fSwizzler; | 121 SkAutoTDelete<SkSwizzler> fSwizzler; |
| 118 | 122 |
| 119 typedef SkCodec INHERITED; | 123 typedef SkCodec INHERITED; |
| 120 }; | 124 }; |
| 121 | 125 |
| 122 #endif | 126 #endif |
| OLD | NEW |