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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 /* | 98 /* |
99 * Checks if the conversion between the input image and the requested output | 99 * Checks if the conversion between the input image and the requested output |
100 * image has been implemented | 100 * image has been implemented |
101 * Sets the output color space | 101 * Sets the output color space |
102 */ | 102 */ |
103 bool setOutputColorSpace(const SkImageInfo& dst); | 103 bool setOutputColorSpace(const SkImageInfo& dst); |
104 | 104 |
105 // scanline decoding | 105 // scanline decoding |
106 SkSampler* getSampler(bool createIfNecessary) override; | 106 SkSampler* getSampler(bool createIfNecessary) override; |
107 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti
ons, | 107 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti
ons, |
108 SkPMColor ctable[], int* ctableCount) override; | 108 SkPMColor ctable[], int* ctableCount) override; |
109 int onGetScanlines(void* dst, int count, size_t rowBytes) override; | 109 int onGetScanlines(void* dst, int count, size_t rowBytes) override; |
110 bool onSkipScanlines(int count) override; | 110 bool onSkipScanlines(int count) override; |
111 | 111 |
112 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; | 112 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; |
113 // We will save the state of the decompress struct after reading the header. | 113 // We will save the state of the decompress struct after reading the header. |
114 // This allows us to safely call onGetScaledDimensions() at any time. | 114 // This allows us to safely call onGetScaledDimensions() at any time. |
115 const int fReadyState; | 115 const int fReadyState; |
116 | 116 |
117 // scanline decoding | 117 // scanline decoding |
118 SkAutoMalloc fStorage; // Only used if sampling is needed | 118 SkAutoMalloc fStorage; // Only used if sampling is needed |
119 uint8_t* fSrcRow; // Only used if sampling is needed | 119 uint8_t* fSrcRow; // Only used if sampling is needed |
120 SkAutoTDelete<SkSwizzler> fSwizzler; | 120 SkAutoTDelete<SkSwizzler> fSwizzler; |
121 | 121 |
122 typedef SkCodec INHERITED; | 122 typedef SkCodec INHERITED; |
123 }; | 123 }; |
124 | 124 |
125 #endif | 125 #endif |
OLD | NEW |