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 20 matching lines...) Expand all Loading... |
31 enum Format { | 31 enum Format { |
32 kUnknown_Format, | 32 kUnknown_Format, |
33 kBMP_Format, | 33 kBMP_Format, |
34 kGIF_Format, | 34 kGIF_Format, |
35 kICO_Format, | 35 kICO_Format, |
36 kJPEG_Format, | 36 kJPEG_Format, |
37 kPNG_Format, | 37 kPNG_Format, |
38 kWBMP_Format, | 38 kWBMP_Format, |
39 kWEBP_Format, | 39 kWEBP_Format, |
40 kPKM_Format, | 40 kPKM_Format, |
| 41 kKTX_Format, |
41 | 42 |
42 kLastKnownFormat = kWEBP_Format, | 43 kLastKnownFormat = kKTX_Format, |
43 }; | 44 }; |
44 | 45 |
45 /** Return the format of image this decoder can decode. If this decoder can
decode multiple | 46 /** Return the format of image this decoder can decode. If this decoder can
decode multiple |
46 formats, kUnknown_Format will be returned. | 47 formats, kUnknown_Format will be returned. |
47 */ | 48 */ |
48 virtual Format getFormat() const; | 49 virtual Format getFormat() const; |
49 | 50 |
50 /** Return the format of the SkStreamRewindable or kUnknown_Format if it can
not be determined. | 51 /** Return the format of the SkStreamRewindable or kUnknown_Format if it can
not be determined. |
51 Rewinds the stream before returning. | 52 Rewinds the stream before returning. |
52 */ | 53 */ |
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
520 // All the decoders known by Skia. Note that, depending on the compiler settings
, | 521 // All the decoders known by Skia. Note that, depending on the compiler settings
, |
521 // not all of these will be available | 522 // not all of these will be available |
522 DECLARE_DECODER_CREATOR(BMPImageDecoder); | 523 DECLARE_DECODER_CREATOR(BMPImageDecoder); |
523 DECLARE_DECODER_CREATOR(GIFImageDecoder); | 524 DECLARE_DECODER_CREATOR(GIFImageDecoder); |
524 DECLARE_DECODER_CREATOR(ICOImageDecoder); | 525 DECLARE_DECODER_CREATOR(ICOImageDecoder); |
525 DECLARE_DECODER_CREATOR(JPEGImageDecoder); | 526 DECLARE_DECODER_CREATOR(JPEGImageDecoder); |
526 DECLARE_DECODER_CREATOR(PNGImageDecoder); | 527 DECLARE_DECODER_CREATOR(PNGImageDecoder); |
527 DECLARE_DECODER_CREATOR(WBMPImageDecoder); | 528 DECLARE_DECODER_CREATOR(WBMPImageDecoder); |
528 DECLARE_DECODER_CREATOR(WEBPImageDecoder); | 529 DECLARE_DECODER_CREATOR(WEBPImageDecoder); |
529 DECLARE_DECODER_CREATOR(PKMImageDecoder); | 530 DECLARE_DECODER_CREATOR(PKMImageDecoder); |
530 | 531 DECLARE_DECODER_CREATOR(KTXImageDecoder); |
531 | 532 |
532 // Typedefs to make registering decoder and formatter callbacks easier. | 533 // Typedefs to make registering decoder and formatter callbacks easier. |
533 // These have to be defined outside SkImageDecoder. :( | 534 // These have to be defined outside SkImageDecoder. :( |
534 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod
er_DecodeReg; | 535 typedef SkTRegistry<SkImageDecoder*(*)(SkStreamRewindable*)> SkImageDecod
er_DecodeReg; |
535 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod
er_FormatReg; | 536 typedef SkTRegistry<SkImageDecoder::Format(*)(SkStreamRewindable*)> SkImageDecod
er_FormatReg; |
536 | 537 |
537 #endif | 538 #endif |
OLD | NEW |