diff options
author | Ryan Harrison <rharrison@chromium.org> | 2018-05-09 14:42:42 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-09 14:42:42 +0000 |
commit | 27924e6c9d43f0eba57d14004853d5a8ba47de26 (patch) | |
tree | fcc6639b62cf2fee783123b1858c618ba773da2e /core/fxcodec/codec/ccodec_progressivedecoder.h | |
parent | 5f7c5be8b7072d46e8d8088a1ec14370ecfad44c (diff) | |
download | pdfium-27924e6c9d43f0eba57d14004853d5a8ba47de26.tar.xz |
Do not build TIFF when codec is disabled
Currently all of the TIFF 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 TIFF codec code if support
for TIFF is turned off. It also fixes cases in the code base where tif
was being used instead of tiff.
BUG=pdfium:1080
Change-Id: If6aaa8af5160fdd5b261e63bab7d5984196efcc9
Reviewed-on: https://pdfium-review.googlesource.com/32193
Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/ccodec_progressivedecoder.h')
-rw-r--r-- | core/fxcodec/codec/ccodec_progressivedecoder.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h index a14ec0db29..9a0136c872 100644 --- a/core/fxcodec/codec/ccodec_progressivedecoder.h +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -15,13 +15,17 @@ #include "core/fxcodec/codec/ccodec_gifmodule.h" #include "core/fxcodec/codec/ccodec_jpegmodule.h" #include "core/fxcodec/codec/ccodec_pngmodule.h" -#include "core/fxcodec/codec/ccodec_tiffmodule.h" #include "core/fxcodec/fx_codec_def.h" #include "core/fxcrt/fx_system.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/unowned_ptr.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_dib.h" +#ifdef PDF_ENABLE_XFA_TIFF +#include "core/fxcodec/codec/ccodec_tiffmodule.h" +#endif // PDF_ENABLE_XFA_TIFF + class CCodec_ModuleMgr; class CFX_DIBAttribute; class IFX_SeekableReadStream; @@ -167,7 +171,9 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, bool JpegDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size); bool PngDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size); bool GifDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size); - bool TifDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size); +#ifdef PDF_ENABLE_XFA_TIFF + bool TiffDetectImageType(CFX_DIBAttribute* pAttribute, uint32_t size); +#endif // PDF_ENABLE_XFA_TIFF void GetDownScale(int& down_scale); void GetTransMethod(FXDIB_Format dest_format, FXCodec_Format src_format); @@ -199,7 +205,9 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, FXCODEC_STATUS PngContinueDecode(); FXCODEC_STATUS GifContinueDecode(); FXCODEC_STATUS BmpContinueDecode(); - FXCODEC_STATUS TifContinueDecode(); +#ifdef PDF_ENABLE_XFA_TIFF + FXCODEC_STATUS TiffContinueDecode(); +#endif // PDF_ENABLE_XFA_TIFF RetainPtr<IFX_SeekableReadStream> m_pFile; RetainPtr<CFX_DIBitmap> m_pDeviceBitmap; @@ -208,7 +216,9 @@ class CCodec_ProgressiveDecoder : public CCodec_BmpModule::Delegate, std::unique_ptr<CCodec_PngModule::Context> m_pPngContext; std::unique_ptr<CCodec_GifModule::Context> m_pGifContext; std::unique_ptr<CCodec_BmpModule::Context> m_pBmpContext; +#ifdef PDF_ENABLE_XFA_TIFF std::unique_ptr<CCodec_TiffModule::Context> m_pTiffContext; +#endif // PDF_ENABLE_XFA_TIFF FXCODEC_IMAGE_TYPE m_imagType; uint32_t m_offSet; uint8_t* m_pSrcBuf; |