Chromium Code Reviews| Index: src/images/SkForceLinking.cpp |
| diff --git a/src/images/SkForceLinking.cpp b/src/images/SkForceLinking.cpp |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..ad694bb9edea1e72ac6ce6df509ea1b7e54f6e8a |
| --- /dev/null |
| +++ b/src/images/SkForceLinking.cpp |
| @@ -0,0 +1,32 @@ |
| +/* |
| + * Copyright 2013 Google Inc. |
| + * |
| + * Use of this source code is governed by a BSD-style license that can be |
| + * found in the LICENSE file. |
| + */ |
| + |
| +#include "SkForceLinking.h" |
| +#include "SkImageDecoder.h" |
| + |
|
robertphillips
2013/05/28 23:22:56
// This method is required to fool the linker into
scroggo
2013/05/29 17:34:20
Done.
|
| +int SkForceLinking(bool doNotPassTrue) { |
| + if (doNotPassTrue) { |
| + SkASSERT(false); |
| + CreateJPEGImageDecoder(); |
| + CreateWEBPImageDecoder(); |
| + CreateBMPImageDecoder(); |
| + CreateICOImageDecoder(); |
| + CreateWBMPImageDecoder(); |
| +#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_WIN) |
| + CreateDefaultDecoder(); |
| +#endif |
| + // Only link GIF and PNG on platforms that build them. See images.gyp |
| +#if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_NACL) |
| + CreateGIFImageDecoder(); |
| +#endif |
| +#if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) |
| + CreatePNGImageDecoder(); |
| +#endif |
| + return -1; |
| + } |
| + return 0; |
| +} |