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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 /* | 143 /* |
144 * @return true if the read is successful and false if the read fails. | 144 * @return true if the read is successful and false if the read fails. |
145 */ | 145 */ |
146 bool readRow(); | 146 bool readRow(); |
147 | 147 |
148 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts , | 148 Result onStartScanlineDecode(const SkImageInfo& dstInfo, const Options& opts , |
149 SkPMColor inputColorPtr[], int* inputColorCount) override; | 149 SkPMColor inputColorPtr[], int* inputColorCount) override; |
150 | 150 |
151 int onGetScanlines(void* dst, int count, size_t rowBytes) override; | 151 int onGetScanlines(void* dst, int count, size_t rowBytes) override; |
152 | 152 |
153 bool onSkipScanlines(int count) override; | |
154 | |
155 /* | |
156 * For a scanline decode of "count" lines, this function indicates how | |
157 * many of the "count" lines should be skipped until we reach the top of | |
158 * the image frame and how many of the "count" lines are acutally inside | |
scroggo
2015/11/19 22:23:06
actually*
msarett
2015/11/19 22:39:22
Done.
| |
159 * the image frame. | |
160 * | |
161 * This only needs to be called when the image frame being decoded is | |
162 * a subset of the size of the entire image. | |
scroggo
2015/11/19 22:23:06
i.e. fFrameIsSubset
Alternatively, this method co
msarett
2015/11/19 22:39:22
Yeah, let's do it this way.
| |
163 * | |
164 * @param count The number of scanlines requested. | |
165 * @param rowsBeforeFrame The number of lines before we reach the top of | |
scroggo
2015/11/19 22:23:06
Maybe specify that these are output variables?
msarett
2015/11/19 22:39:22
Done.
| |
166 * the image frame. | |
167 * @param rowsInFrame The number of lines to decode inside the image | |
168 * frame. | |
169 */ | |
170 void handleScanlineFrame(int count, int* rowsBeforeFrame, int* rowsInFrame); | |
171 | |
153 SkScanlineOrder onGetScanlineOrder() const override; | 172 SkScanlineOrder onGetScanlineOrder() const override; |
154 | 173 |
155 /* | 174 /* |
156 * This function cleans up the gif object after the decode completes | 175 * This function cleans up the gif object after the decode completes |
157 * It is used in a SkAutoTCallIProc template | 176 * It is used in a SkAutoTCallIProc template |
158 */ | 177 */ |
159 static void CloseGif(GifFileType* gif); | 178 static void CloseGif(GifFileType* gif); |
160 | 179 |
161 /* | 180 /* |
162 * Frees any extension data used in the decode | 181 * Frees any extension data used in the decode |
(...skipping 19 matching lines...) Expand all Loading... | |
182 SkAutoTDeleteArray<uint8_t> fSrcBuffer; | 201 SkAutoTDeleteArray<uint8_t> fSrcBuffer; |
183 const SkIRect fFrameRect; | 202 const SkIRect fFrameRect; |
184 const uint32_t fTransIndex; | 203 const uint32_t fTransIndex; |
185 uint32_t fFillIndex; | 204 uint32_t fFillIndex; |
186 const bool fFrameIsSubset; | 205 const bool fFrameIsSubset; |
187 SkAutoTDelete<SkSwizzler> fSwizzler; | 206 SkAutoTDelete<SkSwizzler> fSwizzler; |
188 SkAutoTUnref<SkColorTable> fColorTable; | 207 SkAutoTUnref<SkColorTable> fColorTable; |
189 | 208 |
190 typedef SkCodec INHERITED; | 209 typedef SkCodec INHERITED; |
191 }; | 210 }; |
OLD | NEW |