Index: debugger/SkDebugger.cpp |
diff --git a/debugger/SkDebugger.cpp b/debugger/SkDebugger.cpp |
index 2d13c758d2a335931b972dfaf742054088d45266..cd951444ae9fdb0166191dcfd74ff23ee09bb1d5 100644 |
--- a/debugger/SkDebugger.cpp |
+++ b/debugger/SkDebugger.cpp |
@@ -128,3 +128,18 @@ void SkDebugger::getOverviewText(const SkTDArray<double>* typeTimes, |
overview->appendS32(pictureHeight()); |
overview->append("px"); |
} |
+ |
+#include "SkImageDecoder.h" |
+ |
+void forceLinking(); |
+void forceLinking() { |
+ // This function leaks, but that is okay because it is not intended |
+ // to be called. It is only here so that the linker will include the |
+ // decoders. |
+ SkDEBUGCODE(SkImageDecoder *creator = ) CreateJPEGImageDecoder(); |
+ SkASSERT(creator); |
+#ifdef SK_BUILD_FOR_UNIX |
+ SkDEBUGCODE(creator = ) CreateGIFImageDecoder(); |
+ SkASSERT(creator); |
+#endif |
+} |