summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec/fx_codec.cpp
diff options
context:
space:
mode:
authorRyan Harrison <rharrison@chromium.org>2018-05-09 21:06:22 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-05-09 21:06:22 +0000
commit607f3cd63a314cd3a6c219b19cce31805b66cd6d (patch)
tree74c9bff427b4c8f4697ee28b17bbebe2be411cb2 /core/fxcodec/codec/fx_codec.cpp
parentd5d48457dabbe71e7f6b0baf2eaea6aa0dc86736 (diff)
downloadpdfium-607f3cd63a314cd3a6c219b19cce31805b66cd6d.tar.xz
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 <tsepez@chromium.org> Commit-Queue: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fxcodec/codec/fx_codec.cpp')
-rw-r--r--core/fxcodec/codec/fx_codec.cpp31
1 files changed, 4 insertions, 27 deletions
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp
index 22e4bc50cc..e58da052aa 100644
--- a/core/fxcodec/codec/fx_codec.cpp
+++ b/core/fxcodec/codec/fx_codec.cpp
@@ -26,13 +26,6 @@
#include "third_party/base/logging.h"
#include "third_party/base/ptr_util.h"
-#ifdef PDF_ENABLE_XFA
-#include "core/fxcodec/codec/ccodec_bmpmodule.h"
-#include "core/fxcodec/codec/ccodec_gifmodule.h"
-#include "core/fxcodec/codec/ccodec_pngmodule.h"
-#include "core/fxcodec/codec/ccodec_tiffmodule.h"
-#endif // PDF_ENABLE_XFA
-
namespace {
const uint8_t g_CMYK[81 * 81 * 3] = {
@@ -1364,25 +1357,6 @@ CCodec_ModuleMgr::CCodec_ModuleMgr()
CCodec_ModuleMgr::~CCodec_ModuleMgr() {}
-#ifdef PDF_ENABLE_XFA
-void CCodec_ModuleMgr::SetBmpModule(std::unique_ptr<CCodec_BmpModule> module) {
- m_pBmpModule = std::move(module);
-}
-
-void CCodec_ModuleMgr::SetGifModule(std::unique_ptr<CCodec_GifModule> module) {
- m_pGifModule = std::move(module);
-}
-
-void CCodec_ModuleMgr::SetPngModule(std::unique_ptr<CCodec_PngModule> module) {
- m_pPngModule = std::move(module);
-}
-
-void CCodec_ModuleMgr::SetTiffModule(
- std::unique_ptr<CCodec_TiffModule> module) {
- m_pTiffModule = std::move(module);
-}
-#endif // PDF_ENABLE_XFA
-
bool CCodec_BasicModule::RunLengthEncode(const uint8_t* src_buf,
uint32_t src_size,
uint8_t** dest_buf,
@@ -1540,11 +1514,14 @@ CFX_DIBAttribute::CFX_DIBAttribute()
m_nYDPI(-1),
m_fAspectRatio(-1.0f),
m_wDPIUnit(0),
+#ifdef PDF_ENABLE_XFA_GIF
m_nGifLeft(0),
m_nGifTop(0),
m_pGifLocalPalette(nullptr),
m_nGifLocalPalNum(0),
- m_nBmpCompressType(0) {}
+#endif // PDF_ENABLE_XFA_GIF
+ m_nBmpCompressType(0) {
+}
CFX_DIBAttribute::~CFX_DIBAttribute() {
for (const auto& pair : m_Exif)