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

Unified Diff: src/images/SkForceLinking.cpp

Issue 15806010: Separate core and images project. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Leave SkImageDecoder_iOS alone. Created 7 years, 7 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
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;
+}

Powered by Google App Engine
This is Rietveld 408576698