OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 #ifndef SkImageDecoder_DEFINED | 10 #ifndef SkImageDecoder_DEFINED |
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
281 | 281 |
282 /** | 282 /** |
283 * Decode a rectangle subset in the image. | 283 * Decode a rectangle subset in the image. |
284 * The method can only be called after buildTileIndex(). | 284 * The method can only be called after buildTileIndex(). |
285 * | 285 * |
286 * Return true for success. | 286 * Return true for success. |
287 * Return false if the index is never built or failing in decoding. | 287 * Return false if the index is never built or failing in decoding. |
288 */ | 288 */ |
289 bool decodeSubset(SkBitmap* bm, const SkIRect& subset, SkBitmap::Config pref
); | 289 bool decodeSubset(SkBitmap* bm, const SkIRect& subset, SkBitmap::Config pref
); |
290 | 290 |
291 SK_ATTR_DEPRECATED("use decodeSubset() instead") | |
292 bool decodeRegion(SkBitmap* bitmap, const SkIRect& rect, SkBitmap::Config pr
ef) { | |
293 return this->decodeSubset(bitmap, rect, pref); | |
294 } | |
295 | |
296 /** Given a stream, this will try to find an appropriate decoder object. | 291 /** Given a stream, this will try to find an appropriate decoder object. |
297 If none is found, the method returns NULL. | 292 If none is found, the method returns NULL. |
298 */ | 293 */ |
299 static SkImageDecoder* Factory(SkStreamRewindable*); | 294 static SkImageDecoder* Factory(SkStreamRewindable*); |
300 | 295 |
301 /** Decode the image stored in the specified file, and store the result | 296 /** Decode the image stored in the specified file, and store the result |
302 in bitmap. Return true for success or false on failure. | 297 in bitmap. Return true for success or false on failure. |
303 | 298 |
304 @param prefConfig If the PrefConfigTable is not set, prefer this config. | 299 @param prefConfig If the PrefConfigTable is not set, prefer this config. |
305 See NOTE ABOUT PREFERRED CONFIGS. | 300 See NOTE ABOUT PREFERRED CONFIGS. |
(...skipping 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
531 DECLARE_DECODER_CREATOR(WBMPImageDecoder); | 526 DECLARE_DECODER_CREATOR(WBMPImageDecoder); |
532 DECLARE_DECODER_CREATOR(WEBPImageDecoder); | 527 DECLARE_DECODER_CREATOR(WEBPImageDecoder); |
533 | 528 |
534 | 529 |
535 // Typedefs to make registering decoder and formatter callbacks easier. | 530 // Typedefs to make registering decoder and formatter callbacks easier. |
536 // These have to be defined outside SkImageDecoder. :( | 531 // These have to be defined outside SkImageDecoder. :( |
537 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod
er_DecodeReg; | 532 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod
er_DecodeReg; |
538 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod
er_FormatReg; | 533 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod
er_FormatReg; |
539 | 534 |
540 #endif | 535 #endif |
OLD | NEW |