summaryrefslogtreecommitdiff
path: root/core/fxcodec/fx_codec.h
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-05-10 16:38:15 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-10 16:38:15 +0000
commit95061379c9453b941783398826acff674d2bbfd7 (patch)
tree766885c5e74724ca6120562f6b8a5f57b99a4794 /core/fxcodec/fx_codec.h
parent35557c3ce83cc6e26f07cf5d5c520ee6afd39a67 (diff)
downloadpdfium-95061379c9453b941783398826acff674d2bbfd7.tar.xz
Do not build BMP when codec is disabled
Currently all of the BMP 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 BMP codec code if support for BMP is turned off. BUG=pdfium:1080 Change-Id: I56d40639a5a3631f9c601a1eef3f98873feac94f Reviewed-on: https://pdfium-review.googlesource.com/32370 Commit-Queue: Ryan Harrison <rharrison@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/fx_codec.h')
-rw-r--r--core/fxcodec/fx_codec.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/core/fxcodec/fx_codec.h b/core/fxcodec/fx_codec.h
index b5e8d8ad39..91d9f2fb32 100644
--- a/core/fxcodec/fx_codec.h
+++ b/core/fxcodec/fx_codec.h
@@ -19,7 +19,9 @@
#include "core/fxcrt/fx_string.h"
#ifdef PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA_BMP
#include "core/fxcodec/codec/ccodec_bmpmodule.h"
+#endif // PDF_ENABLE_XFA_BMP
#ifdef PDF_ENABLE_XFA_GIF
#include "core/fxcodec/codec/ccodec_gifmodule.h"
@@ -54,17 +56,20 @@ class CFX_DIBAttribute {
CFX_DIBAttribute();
~CFX_DIBAttribute();
- int32_t m_nXDPI;
- int32_t m_nYDPI;
- float m_fAspectRatio;
- uint16_t m_wDPIUnit;
+#ifdef PDF_ENABLE_XFA_BMP
+ int32_t m_nBmpCompressType;
+#endif // PDF_ENABLE_XFA_BMP
#ifdef PDF_ENABLE_XFA_GIF
int32_t m_nGifLeft;
int32_t m_nGifTop;
uint32_t* m_pGifLocalPalette;
uint32_t m_nGifLocalPalNum;
#endif // PDF_ENABLE_XFA_GIF
- int32_t m_nBmpCompressType;
+
+ int32_t m_nXDPI;
+ int32_t m_nYDPI;
+ float m_fAspectRatio;
+ uint16_t m_wDPIUnit;
std::map<uint32_t, void*> m_Exif;
};
#endif // PDF_ENABLE_XFA
@@ -84,10 +89,13 @@ class CCodec_ModuleMgr {
#ifdef PDF_ENABLE_XFA
std::unique_ptr<CCodec_ProgressiveDecoder> CreateProgressiveDecoder();
+
+#ifdef PDF_ENABLE_XFA_BMP
CCodec_BmpModule* GetBmpModule() const { return m_pBmpModule.get(); }
void SetBmpModule(std::unique_ptr<CCodec_BmpModule> module) {
m_pBmpModule = std::move(module);
}
+#endif // PDF_ENABLE_XFA_BMP
#ifdef PDF_ENABLE_XFA_GIF
CCodec_GifModule* GetGifModule() const { return m_pGifModule.get(); }
@@ -120,7 +128,9 @@ class CCodec_ModuleMgr {
std::unique_ptr<CCodec_IccModule> m_pIccModule;
#ifdef PDF_ENABLE_XFA
+#ifdef PDF_ENABLE_XFA_BMP
std::unique_ptr<CCodec_BmpModule> m_pBmpModule;
+#endif // PDF_ENABLE_XFA_BMP
#ifdef PDF_ENABLE_XFA_GIF
std::unique_ptr<CCodec_GifModule> m_pGifModule;