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 SkScanlineDecoder_DEFINED | 8 #ifndef SkScanlineDecoder_DEFINED |
9 #define SkScanlineDecoder_DEFINED | 9 #define SkScanlineDecoder_DEFINED |
10 | 10 |
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
208 * determine which scanlines are needed and ask for all of them in | 208 * determine which scanlines are needed and ask for all of them in |
209 * a single call to getScanlines(). | 209 * a single call to getScanlines(). |
210 * | 210 * |
211 * Interlaced pngs are an example. | 211 * Interlaced pngs are an example. |
212 */ | 212 */ |
213 kNone_SkScanlineOrder, | 213 kNone_SkScanlineOrder, |
214 }; | 214 }; |
215 | 215 |
216 /** | 216 /** |
217 * An enum representing the order in which scanlines will be returned by | 217 * An enum representing the order in which scanlines will be returned by |
218 * the scanline decoder. | 218 * the scanline decoder. This should not be called until after we have |
219 * called start(). Specifically, we do not know if gifs are interlaced | |
scroggo
2015/09/02 22:45:48
From your comments elsewhere, it sounded like it s
msarett
2015/09/03 17:13:30
I'm happy add more to ReadHeader(). I agree that
scroggo
2015/09/04 18:42:09
We might have decided on that, but I think I did n
| |
220 * until after the call to start(). | |
219 */ | 221 */ |
220 SkScanlineOrder getScanlineOrder() const { return this->onGetScanlineOrder() ; } | 222 SkScanlineOrder getScanlineOrder() const { return this->onGetScanlineOrder() ; } |
221 | 223 |
222 /** | 224 /** |
223 * Returns the y-coordinate of the next row to be returned by the scanline | 225 * Returns the y-coordinate of the next row to be returned by the scanline |
224 * decoder. This will be overridden in the case of | 226 * decoder. This will be overridden in the case of |
225 * kOutOfOrder_SkScanlineOrder and should be unnecessary in the case of | 227 * kOutOfOrder_SkScanlineOrder and should be unnecessary in the case of |
226 * kNone_SkScanlineOrder. | 228 * kNone_SkScanlineOrder. |
227 */ | 229 */ |
228 int getY() const { | 230 int getY() const { |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
279 // Calling the virtual method also means we do not double count | 281 // Calling the virtual method also means we do not double count |
280 // countLines. | 282 // countLines. |
281 return this->onGetScanlines(storage.get(), countLines, 0); | 283 return this->onGetScanlines(storage.get(), countLines, 0); |
282 } | 284 } |
283 | 285 |
284 virtual SkCodec::Result onGetScanlines(void* dst, int countLines, | 286 virtual SkCodec::Result onGetScanlines(void* dst, int countLines, |
285 size_t rowBytes) = 0; | 287 size_t rowBytes) = 0; |
286 | 288 |
287 }; | 289 }; |
288 #endif // SkScanlineDecoder_DEFINED | 290 #endif // SkScanlineDecoder_DEFINED |
OLD | NEW |