aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/images
diff options
context:
space:
mode:
authorGravatar msarett <msarett@google.com>2016-08-16 15:11:24 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-08-16 15:11:24 -0700
commit36931c2b47f81db7ccf441937567c6fda72ad3e6 (patch)
tree9035684869f37b989ad73dc18e684b670d7e2b46 /src/images
parentdb085ab30f58928623447676c46d6bd7a8cc2255 (diff)
Add test for platform encoders, turn off platform encoders by default
Clients that like WIC and CG can still use them. And we can be confident about that, since we now test WIC and CG. Let Skia always use our own encoders by default, so we can do cool, custom things on all platforms. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2250683003 Review-Url: https://codereview.chromium.org/2250683003
Diffstat (limited to 'src/images')
-rw-r--r--src/images/SkForceLinking.cpp20
1 files changed, 9 insertions, 11 deletions
diff --git a/src/images/SkForceLinking.cpp b/src/images/SkForceLinking.cpp
index 2afe7192a9..81d485c882 100644
--- a/src/images/SkForceLinking.cpp
+++ b/src/images/SkForceLinking.cpp
@@ -14,28 +14,26 @@
int SkForceLinking(bool doNotPassTrue) {
if (doNotPassTrue) {
SkASSERT(false);
-#if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_IOS) && \
- defined(SK_HAS_JPEG_LIBRARY)
+#if defined(SK_HAS_JPEG_LIBRARY) && !defined(SK_USE_CG_ENCODER) && !defined(SK_USE_WIC_ENCODER)
CreateJPEGImageEncoder();
#endif
-#if defined(SK_HAS_WEBP_LIBRARY)
+#if defined(SK_HAS_WEBP_LIBRARY) && !defined(SK_USE_CG_ENCODER) && !defined(SK_USE_WIC_ENCODER)
CreateWEBPImageEncoder();
#endif
+#if defined(SK_HAS_PNG_LIBRARY) && !defined(SK_USE_CG_ENCODER) && !defined(SK_USE_WIC_ENCODER)
+ CreatePNGImageEncoder();
+#endif
// Only link hardware texture codecs on platforms that build them. See images.gyp
#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK
CreateKTXImageEncoder();
#endif
-#if !defined(SK_BUILD_FOR_MAC) && !defined(SK_BUILD_FOR_WIN) && !defined(SK_BUILD_FOR_IOS) && \
- defined(SK_HAS_PNG_LIBRARY)
- CreatePNGImageEncoder();
-#endif
-#if defined(SK_BUILD_FOR_MAC) || defined(SK_BUILD_FOR_IOS)
- CreatePNGImageEncoder_CG();
+#if defined (SK_USE_CG_ENCODER)
+ CreateImageEncoder_CG(SkImageEncoder::kPNG_Type);
#endif
-#if defined(SK_BUILD_FOR_WIN)
- CreateImageEncoder_WIC();
+#if defined (SK_USE_WIC_ENCODER)
+ CreateImageEncoder_WIC(SkImageEncoder::kPNG_Type);
#endif
return -1;
}