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 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
42 /** Return the format of image this decoder can decode. If this decoder can
decode multiple | 42 /** Return the format of image this decoder can decode. If this decoder can
decode multiple |
43 formats, kUnknown_Format will be returned. | 43 formats, kUnknown_Format will be returned. |
44 */ | 44 */ |
45 virtual Format getFormat() const; | 45 virtual Format getFormat() const; |
46 | 46 |
47 /** Return the format of the SkStream or kUnknown_Format if it cannot be det
ermined. Rewinds the | 47 /** Return the format of the SkStream or kUnknown_Format if it cannot be det
ermined. Rewinds the |
48 stream before returning. | 48 stream before returning. |
49 */ | 49 */ |
50 static Format GetStreamFormat(SkStream*); | 50 static Format GetStreamFormat(SkStream*); |
51 | 51 |
| 52 /** Return a readable string of the Format provided. |
| 53 */ |
| 54 static const char* GetFormatName(Format); |
| 55 |
52 /** Return a readable string of the value returned by getFormat(). | 56 /** Return a readable string of the value returned by getFormat(). |
53 */ | 57 */ |
54 const char* getFormatName() const; | 58 const char* getFormatName() const; |
55 | 59 |
56 /** Returns true if the decoder should try to dither the resulting image. | 60 /** Returns true if the decoder should try to dither the resulting image. |
57 The default setting is true. | 61 The default setting is true. |
58 */ | 62 */ |
59 bool getDitherImage() const { return fDitherImage; } | 63 bool getDitherImage() const { return fDitherImage; } |
60 | 64 |
61 /** Set to true if the the decoder should try to dither the resulting image. | 65 /** Set to true if the the decoder should try to dither the resulting image. |
(...skipping 412 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
474 // not all of these will be available | 478 // not all of these will be available |
475 DECLARE_DECODER_CREATOR(BMPImageDecoder); | 479 DECLARE_DECODER_CREATOR(BMPImageDecoder); |
476 DECLARE_DECODER_CREATOR(GIFImageDecoder); | 480 DECLARE_DECODER_CREATOR(GIFImageDecoder); |
477 DECLARE_DECODER_CREATOR(ICOImageDecoder); | 481 DECLARE_DECODER_CREATOR(ICOImageDecoder); |
478 DECLARE_DECODER_CREATOR(JPEGImageDecoder); | 482 DECLARE_DECODER_CREATOR(JPEGImageDecoder); |
479 DECLARE_DECODER_CREATOR(PNGImageDecoder); | 483 DECLARE_DECODER_CREATOR(PNGImageDecoder); |
480 DECLARE_DECODER_CREATOR(WBMPImageDecoder); | 484 DECLARE_DECODER_CREATOR(WBMPImageDecoder); |
481 DECLARE_DECODER_CREATOR(WEBPImageDecoder); | 485 DECLARE_DECODER_CREATOR(WEBPImageDecoder); |
482 | 486 |
483 #endif | 487 #endif |
OLD | NEW |