summaryrefslogtreecommitdiff
path: root/core/fxcodec/codec
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-09-19 14:34:37 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-09-20 01:29:52 +0000
commit7acd8268491ba9724b245b5dc594c8a4deeca9ee (patch)
tree6a24497b4ce6115c0a08eb71022b46d9318ac722 /core/fxcodec/codec
parent4b8d363ceed5437ee6a23563f69ba0a73d90413c (diff)
downloadpdfium-7acd8268491ba9724b245b5dc594c8a4deeca9ee.tar.xz
Forward declare codec modules in fx_codec.h.
Change-Id: I020b862619f3f93f71dbb027b9e799d78744f686 Reviewed-on: https://pdfium-review.googlesource.com/14391 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fxcodec/codec')
-rw-r--r--core/fxcodec/codec/fx_codec.cpp33
-rw-r--r--core/fxcodec/codec/fx_codec_fax.cpp2
-rw-r--r--core/fxcodec/codec/fx_codec_flate.cpp2
-rw-r--r--core/fxcodec/codec/fx_codec_icc.cpp8
-rw-r--r--core/fxcodec/codec/fx_codec_jpx_opj.cpp2
5 files changed, 37 insertions, 10 deletions
diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp
index 6bcea4b48e..4d094e54fb 100644
--- a/core/fxcodec/codec/fx_codec.cpp
+++ b/core/fxcodec/codec/fx_codec.cpp
@@ -12,6 +12,13 @@
#include <tuple>
#include <utility>
+#include "core/fxcodec/codec/ccodec_basicmodule.h"
+#include "core/fxcodec/codec/ccodec_faxmodule.h"
+#include "core/fxcodec/codec/ccodec_flatemodule.h"
+#include "core/fxcodec/codec/ccodec_iccmodule.h"
+#include "core/fxcodec/codec/ccodec_jbig2module.h"
+#include "core/fxcodec/codec/ccodec_jpegmodule.h"
+#include "core/fxcodec/codec/ccodec_jpxmodule.h"
#include "core/fxcodec/codec/ccodec_scanlinedecoder.h"
#include "core/fxcodec/codec/codec_int.h"
#include "core/fxcrt/fx_extension.h"
@@ -19,6 +26,13 @@
#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] = {
@@ -1350,6 +1364,25 @@ 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,
diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp
index 9cd2cb9a51..9c8eaa25ce 100644
--- a/core/fxcodec/codec/fx_codec_fax.cpp
+++ b/core/fxcodec/codec/fx_codec_fax.cpp
@@ -8,9 +8,9 @@
#include <memory>
#include <vector>
+#include "core/fxcodec/codec/ccodec_faxmodule.h"
#include "core/fxcodec/codec/ccodec_scanlinedecoder.h"
#include "core/fxcodec/codec/codec_int.h"
-#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/cfx_binarybuf.h"
#include "core/fxcrt/fx_memory.h"
#include "third_party/base/ptr_util.h"
diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp
index 72b20741b5..5b1df38913 100644
--- a/core/fxcodec/codec/fx_codec_flate.cpp
+++ b/core/fxcodec/codec/fx_codec_flate.cpp
@@ -11,8 +11,8 @@
#include <utility>
#include <vector>
+#include "core/fxcodec/codec/ccodec_flatemodule.h"
#include "core/fxcodec/codec/ccodec_scanlinedecoder.h"
-#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/fx_extension.h"
#include "third_party/base/numerics/safe_conversions.h"
#include "third_party/base/ptr_util.h"
diff --git a/core/fxcodec/codec/fx_codec_icc.cpp b/core/fxcodec/codec/fx_codec_icc.cpp
index e17b2e2d00..7f6078a636 100644
--- a/core/fxcodec/codec/fx_codec_icc.cpp
+++ b/core/fxcodec/codec/fx_codec_icc.cpp
@@ -6,16 +6,10 @@
#include <memory>
+#include "core/fxcodec/codec/ccodec_iccmodule.h"
#include "core/fxcodec/codec/codec_int.h"
-#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/cfx_fixedbufgrow.h"
-#if defined(USE_SYSTEM_LCMS2)
-#include <lcms2.h>
-#else
-#include "third_party/lcms/include/lcms2.h"
-#endif
-
namespace {
bool Check3Components(cmsColorSpaceSignature cs, bool bDst) {
diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
index 03f06b872d..b50c01227f 100644
--- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp
+++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp
@@ -11,8 +11,8 @@
#include <vector>
#include "core/fpdfapi/page/cpdf_colorspace.h"
+#include "core/fxcodec/codec/ccodec_jpxmodule.h"
#include "core/fxcodec/codec/cjpx_decoder.h"
-#include "core/fxcodec/fx_codec.h"
#include "core/fxcrt/fx_memory.h"
#include "core/fxcrt/fx_safe_types.h"
#include "third_party/base/ptr_util.h"