Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2942)

Unified Diff: debugger/SkDebugger.cpp

Issue 14135004: Force the debugger to link decoders. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
+}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698