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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
96 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de
coderMgr); | 96 SkJpegCodec(const SkImageInfo& srcInfo, SkStream* stream, JpegDecoderMgr* de
coderMgr); |
97 | 97 |
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 void initializeSwizzler(const SkImageInfo& dstInfo, const Options& options); |
106 SkSampler* getSampler(bool createIfNecessary) override; | 107 SkSampler* getSampler(bool createIfNecessary) override; |
107 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti
ons, | 108 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opti
ons, |
108 SkPMColor ctable[], int* ctableCount) override; | 109 SkPMColor ctable[], int* ctableCount) override; |
109 int onGetScanlines(void* dst, int count, size_t rowBytes) override; | 110 int onGetScanlines(void* dst, int count, size_t rowBytes) override; |
110 bool onSkipScanlines(int count) override; | 111 bool onSkipScanlines(int count) override; |
111 | 112 |
112 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; | 113 SkAutoTDelete<JpegDecoderMgr> fDecoderMgr; |
113 // We will save the state of the decompress struct after reading the header. | 114 // We will save the state of the decompress struct after reading the header. |
114 // This allows us to safely call onGetScaledDimensions() at any time. | 115 // This allows us to safely call onGetScaledDimensions() at any time. |
115 const int fReadyState; | 116 const int fReadyState; |
116 | 117 |
117 // scanline decoding | 118 // scanline decoding |
118 SkAutoMalloc fStorage; // Only used if sampling is needed | 119 SkAutoMalloc fStorage; // Only used if sampling is needed |
119 uint8_t* fSrcRow; // Only used if sampling is needed | 120 uint8_t* fSrcRow; // Only used if sampling is needed |
120 SkAutoTDelete<SkSwizzler> fSwizzler; | 121 SkAutoTDelete<SkSwizzler> fSwizzler; |
121 | 122 |
122 typedef SkCodec INHERITED; | 123 typedef SkCodec INHERITED; |
123 }; | 124 }; |
124 | 125 |
125 #endif | 126 #endif |
OLD | NEW |