summaryrefslogtreecommitdiff
path: root/xfa/fxfa
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-05-09 20:31:12 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 20:31:12 +0000
commitd5d48457dabbe71e7f6b0baf2eaea6aa0dc86736 (patch)
tree5694486d6c11a60a0ce602759c3c1e07c63b46fc /xfa/fxfa
parent54ef2cb9eb5b145c6e973e95ccb488e121556ad7 (diff)
downloadpdfium-d5d48457dabbe71e7f6b0baf2eaea6aa0dc86736.tar.xz
Do not build PNG when codec is disabled
Currently all of the PNG related code is being built when support for the codec is disabled, it just isn't being utilized. Depending on the settings being used, this unneeded code may or may not get stripped during linking. This CL explicitly turns off building the PNG codec code if support for PNG is turned off. BUG=pdfium:1080 Change-Id: I9c5247145fcadbcb1bd2243aa83350304ba421ff Reviewed-on: https://pdfium-review.googlesource.com/32270 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'xfa/fxfa')
-rw-r--r--xfa/fxfa/cxfa_ffwidget.cpp2
-rw-r--r--xfa/fxfa/parser/cxfa_node.cpp2
2 files changed, 4 insertions, 0 deletions
diff --git a/xfa/fxfa/cxfa_ffwidget.cpp b/xfa/fxfa/cxfa_ffwidget.cpp
index 6fd2397670..3c5a3411a7 100644
--- a/xfa/fxfa/cxfa_ffwidget.cpp
+++ b/xfa/fxfa/cxfa_ffwidget.cpp
@@ -52,7 +52,9 @@ FXDIB_Format XFA_GetDIBFormat(FXCODEC_IMAGE_TYPE type,
dibFormat = FXDIB_Rgb;
}
} break;
+#ifdef PDF_ENABLE_XFA_PNG
case FXCODEC_IMAGE_PNG:
+#endif // PDF_ENABLE_XFA_PNG
default:
break;
}
diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp
index 674ec00d8e..7e479b1858 100644
--- a/xfa/fxfa/parser/cxfa_node.cpp
+++ b/xfa/fxfa/parser/cxfa_node.cpp
@@ -165,8 +165,10 @@ FXCODEC_IMAGE_TYPE XFA_GetImageType(const WideString& wsType) {
wsContentType.MakeLower();
if (wsContentType == L"image/jpg")
return FXCODEC_IMAGE_JPG;
+#ifdef PDF_ENABLE_XFA_PNG
if (wsContentType == L"image/png")
return FXCODEC_IMAGE_PNG;
+#endif // PDF_ENABLE_XFA_PNG
if (wsContentType == L"image/gif")
return FXCODEC_IMAGE_GIF;
if (wsContentType == L"image/bmp")