| 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 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 388 * the coordinate in the original bitmap. | 388 * the coordinate in the original bitmap. |
| 389 * @param (width, height) the width and height of the unsampled dst. | 389 * @param (width, height) the width and height of the unsampled dst. |
| 390 * @param (srcX, srcY) the upper-left point of the src bitmap in terms of | 390 * @param (srcX, srcY) the upper-left point of the src bitmap in terms of |
| 391 * the coordinate in the original bitmap. | 391 * the coordinate in the original bitmap. |
| 392 * @return bool Whether or not it succeeded. | 392 * @return bool Whether or not it succeeded. |
| 393 */ | 393 */ |
| 394 bool cropBitmap(SkBitmap *dst, SkBitmap *src, int sampleSize, | 394 bool cropBitmap(SkBitmap *dst, SkBitmap *src, int sampleSize, |
| 395 int dstX, int dstY, int width, int height, | 395 int dstX, int dstY, int width, int height, |
| 396 int srcX, int srcY); | 396 int srcX, int srcY); |
| 397 | 397 |
| 398 /** |
| 399 * Copy all fields on this decoder to the other decoder. Used by subclasses |
| 400 * to decode a subimage using a different decoder, but with the same settin
gs. |
| 401 */ |
| 402 void copyFieldsToOther(SkImageDecoder* other); |
| 398 | 403 |
| 404 /** |
| 405 * Return the default preference being used by the current or latest call t
o |
| 406 * decode. |
| 407 */ |
| 408 SkBitmap::Config getDefaultPref() { return fDefaultPref; } |
| 399 | 409 |
| 400 /** Can be queried from within onDecode, to see if the user (possibly in | 410 /** Can be queried from within onDecode, to see if the user (possibly in |
| 401 a different thread) has requested the decode to cancel. If this returns | 411 a different thread) has requested the decode to cancel. If this returns |
| 402 true, your onDecode() should stop and return false. | 412 true, your onDecode() should stop and return false. |
| 403 Each subclass needs to decide how often it can query this, to balance | 413 Each subclass needs to decide how often it can query this, to balance |
| 404 responsiveness with performance. | 414 responsiveness with performance. |
| 405 | 415 |
| 406 Calling this outside of onDecode() may return undefined values. | 416 Calling this outside of onDecode() may return undefined values. |
| 407 */ | 417 */ |
| 408 | 418 |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 491 // not all of these will be available | 501 // not all of these will be available |
| 492 DECLARE_DECODER_CREATOR(BMPImageDecoder); | 502 DECLARE_DECODER_CREATOR(BMPImageDecoder); |
| 493 DECLARE_DECODER_CREATOR(GIFImageDecoder); | 503 DECLARE_DECODER_CREATOR(GIFImageDecoder); |
| 494 DECLARE_DECODER_CREATOR(ICOImageDecoder); | 504 DECLARE_DECODER_CREATOR(ICOImageDecoder); |
| 495 DECLARE_DECODER_CREATOR(JPEGImageDecoder); | 505 DECLARE_DECODER_CREATOR(JPEGImageDecoder); |
| 496 DECLARE_DECODER_CREATOR(PNGImageDecoder); | 506 DECLARE_DECODER_CREATOR(PNGImageDecoder); |
| 497 DECLARE_DECODER_CREATOR(WBMPImageDecoder); | 507 DECLARE_DECODER_CREATOR(WBMPImageDecoder); |
| 498 DECLARE_DECODER_CREATOR(WEBPImageDecoder); | 508 DECLARE_DECODER_CREATOR(WEBPImageDecoder); |
| 499 | 509 |
| 500 #endif | 510 #endif |
| OLD | NEW |