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 #include "SkCodec.h" | 8 #include "SkCodec.h" |
9 #include "SkColorTable.h" | 9 #include "SkColorTable.h" |
10 #include "SkImageInfo.h" | 10 #include "SkImageInfo.h" |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr, | 116 Result prepareToDecode(const SkImageInfo& dstInfo, SkPMColor* inputColorPtr, |
117 int* inputColorCount, const Options& opts); | 117 int* inputColorCount, const Options& opts); |
118 | 118 |
119 /* | 119 /* |
120 * Initializes the swizzler. | 120 * Initializes the swizzler. |
121 * | 121 * |
122 * @param dstInfo Output image information. Dimensions may have been | 122 * @param dstInfo Output image information. Dimensions may have been |
123 * adjusted if the image frame size does not match the size | 123 * adjusted if the image frame size does not match the size |
124 * indicated in the header. | 124 * indicated in the header. |
125 * @param zeroInit Indicates if destination memory is zero initialized. | 125 * @param zeroInit Indicates if destination memory is zero initialized. |
| 126 * @param subsetLeft Left offset for each row decode. |
| 127 * @param subsetWidth Width of each row decode. |
126 */ | 128 */ |
127 Result initializeSwizzler(const SkImageInfo& dstInfo, ZeroInitialized zeroIn
it); | 129 Result initializeSwizzler(const SkImageInfo& dstInfo, |
| 130 ZeroInitialized zeroInit, int subsetLeft, int subsetWidth); |
128 | 131 |
129 /* | 132 /* |
130 * @return true if the read is successful and false if the read fails. | 133 * @return true if the read is successful and false if the read fails. |
131 */ | 134 */ |
132 bool readRow(); | 135 bool readRow(); |
133 | 136 |
134 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts
, | 137 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts
, |
135 SkPMColor inputColorPtr[], int* inputColorCount) override; | 138 SkPMColor inputColorPtr[], int* inputColorCount, int subsetLe
ft, |
| 139 int subsetWidth) override; |
136 | 140 |
137 int onGetScanlines(void* dst, int count, size_t rowBytes) override; | 141 int onGetScanlines(void* dst, int count, size_t rowBytes) override; |
138 | 142 |
139 SkScanlineOrder onGetScanlineOrder() const override; | 143 SkScanlineOrder onGetScanlineOrder() const override; |
140 | 144 |
141 /* | 145 /* |
142 * This function cleans up the gif object after the decode completes | 146 * This function cleans up the gif object after the decode completes |
143 * It is used in a SkAutoTCallIProc template | 147 * It is used in a SkAutoTCallIProc template |
144 */ | 148 */ |
145 static void CloseGif(GifFileType* gif); | 149 static void CloseGif(GifFileType* gif); |
(...skipping 21 matching lines...) Expand all Loading... |
167 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 171 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
168 SkIRect fFrameDims; | 172 SkIRect fFrameDims; |
169 const uint32_t fTransIndex; | 173 const uint32_t fTransIndex; |
170 uint32_t fFillIndex; | 174 uint32_t fFillIndex; |
171 bool fFrameIsSubset; | 175 bool fFrameIsSubset; |
172 SkAutoTDelete<SkSwizzler> fSwizzler; | 176 SkAutoTDelete<SkSwizzler> fSwizzler; |
173 SkAutoTUnref<SkColorTable> fColorTable; | 177 SkAutoTUnref<SkColorTable> fColorTable; |
174 | 178 |
175 typedef SkCodec INHERITED; | 179 typedef SkCodec INHERITED; |
176 }; | 180 }; |
OLD | NEW |