Chromium Code Reviews| Index: core/include/fxcodec/fx_codec.h |
| diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h |
| index 54ea64544acc00a99f4915d086559b0f3cb7f4a4..54d185a8cef3fbcb3f4c1f13de291ec3353fdd6e 100644 |
| --- a/core/include/fxcodec/fx_codec.h |
| +++ b/core/include/fxcodec/fx_codec.h |
| @@ -7,29 +7,45 @@ |
| #ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_H_ |
| #define CORE_INCLUDE_FXCODEC_FX_CODEC_H_ |
| +#ifdef PDF_ENABLE_XFA |
| #include <map> |
|
Lei Zhang
2015/11/24 23:36:04
Can we have a single #ifdef PDF_ENABLE_XFA block f
Tom Sepez
2015/11/25 18:51:45
Yep, will fix in next CL.
|
| +#endif |
| #include <vector> |
| #include "core/include/fxcrt/fx_basic.h" |
| #include "fx_codec_def.h" |
| #include "third_party/base/nonstd_unique_ptr.h" |
| +#ifdef PDF_ENABLE_XFA |
| #include "../fxcrt/fx_coordinates.h" // For FX_RECT. |
| +#endif |
| class CFX_DIBSource; |
| class CJPX_Decoder; |
| class CPDF_PrivateData; |
| class CPDF_StreamAcc; |
| +#ifndef PDF_ENABLE_XFA |
|
Lei Zhang
2015/11/24 23:36:04
Ditto, move these to the separate block below.
Tom Sepez
2015/11/25 18:51:45
Acknowledged.
|
| +class ICodec_ScanlineDecoder; |
| +#endif |
| class ICodec_BasicModule; |
| class ICodec_FaxModule; |
| +#ifdef PDF_ENABLE_XFA |
| class ICodec_FlateModule; |
| class ICodec_IccModule; |
| class ICodec_Jbig2Encoder; |
| class ICodec_Jbig2Module; |
| +#endif |
| class ICodec_JpegModule; |
| class ICodec_JpxModule; |
| +#ifndef PDF_ENABLE_XFA |
| +class ICodec_Jbig2Module; |
| +class ICodec_IccModule; |
| +class ICodec_FlateModule; |
| +class ICodec_Jbig2Encoder; |
| +#endif |
| class ICodec_ScanlineDecoder; |
| +#ifdef PDF_ENABLE_XFA |
| class ICodec_BmpModule; |
| class ICodec_GifModule; |
| class ICodec_PngModule; |
| @@ -55,6 +71,7 @@ class CFX_DIBAttribute { |
| std::map<FX_DWORD, void*> m_Exif; |
| }; |
| +#endif |
| class CCodec_ModuleMgr { |
| public: |
| CCodec_ModuleMgr(); |
| @@ -67,12 +84,14 @@ class CCodec_ModuleMgr { |
| ICodec_IccModule* GetIccModule() const { return m_pIccModule.get(); } |
| ICodec_FlateModule* GetFlateModule() const { return m_pFlateModule.get(); } |
| +#ifdef PDF_ENABLE_XFA |
| ICodec_ProgressiveDecoder* CreateProgressiveDecoder(); |
| ICodec_PngModule* GetPngModule() const { return m_pPngModule.get(); } |
| ICodec_GifModule* GetGifModule() const { return m_pGifModule.get(); } |
| ICodec_BmpModule* GetBmpModule() const { return m_pBmpModule.get(); } |
| ICodec_TiffModule* GetTiffModule() const { return m_pTiffModule.get(); } |
| +#endif |
| protected: |
| nonstd::unique_ptr<ICodec_BasicModule> m_pBasicModule; |
| nonstd::unique_ptr<ICodec_FaxModule> m_pFaxModule; |
| @@ -81,11 +100,13 @@ class CCodec_ModuleMgr { |
| nonstd::unique_ptr<ICodec_Jbig2Module> m_pJbig2Module; |
| nonstd::unique_ptr<ICodec_IccModule> m_pIccModule; |
| nonstd::unique_ptr<ICodec_FlateModule> m_pFlateModule; |
| +#ifdef PDF_ENABLE_XFA |
|
Lei Zhang
2015/11/24 23:36:04
blink line above, not below.
|
| nonstd::unique_ptr<ICodec_PngModule> m_pPngModule; |
| nonstd::unique_ptr<ICodec_GifModule> m_pGifModule; |
| nonstd::unique_ptr<ICodec_BmpModule> m_pBmpModule; |
| nonstd::unique_ptr<ICodec_TiffModule> m_pTiffModule; |
| +#endif |
| }; |
| class ICodec_BasicModule { |
| public: |
| @@ -229,8 +250,12 @@ class ICodec_JpegModule { |
| virtual int ReadHeader(void* pContext, |
| int* width, |
| int* height, |
| +#ifndef PDF_ENABLE_XFA |
|
Lei Zhang
2015/11/24 23:36:04
#ifdef PDF_ENABLE_XFA
... nComps,\n...pAttribute..
Tom Sepez
2015/11/25 00:12:06
Making this purely "additive" (by that I mean no "
|
| + int* nComps) = 0; |
| +#else |
| int* nComps, |
| CFX_DIBAttribute* pAttribute) = 0; |
| +#endif |
| virtual int StartScanline(void* pContext, int down_scale) = 0; |
| @@ -260,6 +285,7 @@ class ICodec_JpxModule { |
| virtual void DestroyDecoder(CJPX_Decoder* pDecoder) = 0; |
| }; |
| +#ifdef PDF_ENABLE_XFA |
| class ICodec_PngModule { |
| public: |
| virtual ~ICodec_PngModule() {} |
| @@ -387,6 +413,7 @@ class ICodec_TiffModule { |
| virtual void DestroyDecoder(void* ctx) = 0; |
| }; |
| +#endif |
|
Lei Zhang
2015/11/24 23:36:04
How about adding // PDF_ENABLE_XFA if the block is
|
| class ICodec_Jbig2Module { |
| public: |
| @@ -408,6 +435,7 @@ class ICodec_Jbig2Module { |
| IFX_Pause* pPause) = 0; |
| virtual void DestroyJbig2Context(void* pJbig2Content) = 0; |
| }; |
| +#ifdef PDF_ENABLE_XFA |
| class ICodec_ProgressiveDecoder { |
| public: |
| virtual ~ICodec_ProgressiveDecoder() {} |
| @@ -437,6 +465,7 @@ class ICodec_ProgressiveDecoder { |
| virtual FXCODEC_STATUS ContinueDecode(IFX_Pause* pPause = NULL) = 0; |
| }; |
| +#endif |
| class ICodec_Jbig2Encoder { |
| public: |
| virtual ~ICodec_Jbig2Encoder() {} |