OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
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 #include "SkBitmap.h" | 8 #include "SkBitmap.h" |
9 #include "SkCommandLineFlags.h" | 9 #include "SkCommandLineFlags.h" |
10 #include "SkGraphics.h" | 10 #include "SkGraphics.h" |
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
152 print_strings("Missing codec", nocodecs); | 152 print_strings("Missing codec", nocodecs); |
153 print_strings("Failed to decode", failures); | 153 print_strings("Failed to decode", failures); |
154 print_strings("Decoded", successes); | 154 print_strings("Decoded", successes); |
155 | 155 |
156 return 0; | 156 return 0; |
157 } | 157 } |
158 | 158 |
159 void forceLinking(); | 159 void forceLinking(); |
160 | 160 |
161 void forceLinking() { | 161 void forceLinking() { |
| 162 // This function leaks, but that is okay because it is not intended |
| 163 // to be called. It is only here so that the linker will include the |
| 164 // decoders. |
162 SkDEBUGCODE(SkImageDecoder *creator = ) CreateJPEGImageDecoder(); | 165 SkDEBUGCODE(SkImageDecoder *creator = ) CreateJPEGImageDecoder(); |
163 SkASSERT(creator); | 166 SkASSERT(creator); |
| 167 #ifdef SK_BUILD_FOR_UNIX |
| 168 SkDEBUGCODE(creator = ) CreateGIFImageDecoder(); |
| 169 SkASSERT(creator); |
| 170 #endif |
164 } | 171 } |
165 | 172 |
166 #if !defined SK_BUILD_FOR_IOS | 173 #if !defined SK_BUILD_FOR_IOS |
167 int main(int argc, char * const argv[]) { | 174 int main(int argc, char * const argv[]) { |
168 return tool_main(argc, (char**) argv); | 175 return tool_main(argc, (char**) argv); |
169 } | 176 } |
170 #endif | 177 #endif |
OLD | NEW |