From 607f3cd63a314cd3a6c219b19cce31805b66cd6d Mon Sep 17 00:00:00 2001 From: Ryan Harrison Date: Wed, 9 May 2018 21:06:22 +0000 Subject: Do not build GIF when codec is disabled Currently all of the GIF 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 GIF codec code if support for GIF is turned off. This also catches a few missed cases from previous CLs. BUG=pdfium:1080 Change-Id: Ie7fe2d894d2ae2f8f36ae05e0ff256f2ce6ef8d4 Reviewed-on: https://pdfium-review.googlesource.com/32330 Reviewed-by: Tom Sepez Commit-Queue: Ryan Harrison --- xfa/fxfa/parser/cxfa_node.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'xfa/fxfa') diff --git a/xfa/fxfa/parser/cxfa_node.cpp b/xfa/fxfa/parser/cxfa_node.cpp index 7e479b1858..f178bd92a9 100644 --- a/xfa/fxfa/parser/cxfa_node.cpp +++ b/xfa/fxfa/parser/cxfa_node.cpp @@ -169,8 +169,10 @@ FXCODEC_IMAGE_TYPE XFA_GetImageType(const WideString& wsType) { if (wsContentType == L"image/png") return FXCODEC_IMAGE_PNG; #endif // PDF_ENABLE_XFA_PNG +#ifdef PDF_ENABLE_XFA_GIF if (wsContentType == L"image/gif") return FXCODEC_IMAGE_GIF; +#endif // PDF_ENABLE_XFA_GIF if (wsContentType == L"image/bmp") return FXCODEC_IMAGE_BMP; #ifdef PDF_ENABLE_XFA_TIFF -- cgit v1.2.3