| 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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 */ | 320 */ |
| 321 static SkBitmap::Config GetDeviceConfig(); | 321 static SkBitmap::Config GetDeviceConfig(); |
| 322 /** Set the default config for the running device. | 322 /** Set the default config for the running device. |
| 323 Currently this used as a suggestion to image decoders that need to guess | 323 Currently this used as a suggestion to image decoders that need to guess |
| 324 what config they should decode into. | 324 what config they should decode into. |
| 325 Default is kNo_Config. | 325 Default is kNo_Config. |
| 326 This can be queried with GetDeviceConfig() | 326 This can be queried with GetDeviceConfig() |
| 327 */ | 327 */ |
| 328 static void SetDeviceConfig(SkBitmap::Config); | 328 static void SetDeviceConfig(SkBitmap::Config); |
| 329 | 329 |
| 330 /** @cond UNIT_TEST */ | |
| 331 SkDEBUGCODE(static void UnitTest();) | |
| 332 /** @endcond */ | |
| 333 | |
| 334 protected: | 330 protected: |
| 335 // must be overridden in subclasses. This guy is called by decode(...) | 331 // must be overridden in subclasses. This guy is called by decode(...) |
| 336 virtual bool onDecode(SkStream*, SkBitmap* bitmap, Mode) = 0; | 332 virtual bool onDecode(SkStream*, SkBitmap* bitmap, Mode) = 0; |
| 337 | 333 |
| 338 // If the decoder wants to support tiled based decoding, | 334 // If the decoder wants to support tiled based decoding, |
| 339 // this method must be overridden. This guy is called by buildTileIndex(...) | 335 // this method must be overridden. This guy is called by buildTileIndex(...) |
| 340 virtual bool onBuildTileIndex(SkStream*, int *width, int *height) { | 336 virtual bool onBuildTileIndex(SkStream*, int *width, int *height) { |
| 341 return false; | 337 return false; |
| 342 } | 338 } |
| 343 | 339 |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 // not all of these will be available | 467 // not all of these will be available |
| 472 DECLARE_DECODER_CREATOR(BMPImageDecoder); | 468 DECLARE_DECODER_CREATOR(BMPImageDecoder); |
| 473 DECLARE_DECODER_CREATOR(GIFImageDecoder); | 469 DECLARE_DECODER_CREATOR(GIFImageDecoder); |
| 474 DECLARE_DECODER_CREATOR(ICOImageDecoder); | 470 DECLARE_DECODER_CREATOR(ICOImageDecoder); |
| 475 DECLARE_DECODER_CREATOR(JPEGImageDecoder); | 471 DECLARE_DECODER_CREATOR(JPEGImageDecoder); |
| 476 DECLARE_DECODER_CREATOR(PNGImageDecoder); | 472 DECLARE_DECODER_CREATOR(PNGImageDecoder); |
| 477 DECLARE_DECODER_CREATOR(WBMPImageDecoder); | 473 DECLARE_DECODER_CREATOR(WBMPImageDecoder); |
| 478 DECLARE_DECODER_CREATOR(WEBPImageDecoder); | 474 DECLARE_DECODER_CREATOR(WEBPImageDecoder); |
| 479 | 475 |
| 480 #endif | 476 #endif |
| OLD | NEW |