| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 | 8 |
| 9 #include "SkImageDecoder.h" | 9 #include "SkImageDecoder.h" |
| 10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
| (...skipping 330 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 341 } | 341 } |
| 342 | 342 |
| 343 namespace { | 343 namespace { |
| 344 /** | 344 /** |
| 345 * This function leaks, but that is okay because it is not intended | 345 * This function leaks, but that is okay because it is not intended |
| 346 * to be called. It is only here so that the linker will include the | 346 * to be called. It is only here so that the linker will include the |
| 347 * decoders. | 347 * decoders. |
| 348 * Make sure to keep it in sync with images.gyp, so only the encoders | 348 * Make sure to keep it in sync with images.gyp, so only the encoders |
| 349 * which are created on a platform are linked. | 349 * which are created on a platform are linked. |
| 350 */ | 350 */ |
| 351 void force_linking(); |
| 351 void force_linking() { | 352 void force_linking() { |
| 352 SkASSERT(false); | 353 SkASSERT(false); |
| 353 CreateJPEGImageDecoder(); | 354 CreateJPEGImageDecoder(); |
| 354 CreateWEBPImageDecoder(); | 355 CreateWEBPImageDecoder(); |
| 355 CreateBMPImageDecoder(); | 356 CreateBMPImageDecoder(); |
| 356 CreateICOImageDecoder(); | 357 CreateICOImageDecoder(); |
| 357 CreateWBMPImageDecoder(); | 358 CreateWBMPImageDecoder(); |
| 358 // Only link GIF and PNG on platforms that build them. See images.gyp | 359 // Only link GIF and PNG on platforms that build them. See images.gyp |
| 359 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUIL
D_FOR_NACL) | 360 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUIL
D_FOR_NACL) |
| 360 CreateGIFImageDecoder(); | 361 CreateGIFImageDecoder(); |
| 361 #endif | 362 #endif |
| 362 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) | 363 #if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) |
| 363 CreatePNGImageDecoder(); | 364 CreatePNGImageDecoder(); |
| 364 #endif | 365 #endif |
| 365 } | 366 } |
| 366 } | 367 } |
| OLD | NEW |