From 8a4e286e686c3027f382afb07d3ddcec4610fdd9 Mon Sep 17 00:00:00 2001 From: dsinclair Date: Thu, 29 Sep 2016 13:43:30 -0700 Subject: Move core/fxcodec/codec/include and core/fxcodec/include files up BUG=pdfium:611 Review-Url: https://codereview.chromium.org/2381063002 --- BUILD.gn | 8 +- core/fpdfapi/cpdf_modulemgr.cpp | 2 +- core/fpdfapi/fpdf_page/cpdf_colorspace.cpp | 2 +- core/fpdfapi/fpdf_page/cpdf_image.cpp | 2 +- core/fpdfapi/fpdf_page/fpdf_page_colors.cpp | 2 +- core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp | 2 +- core/fpdfapi/fpdf_parser/cpdf_document.cpp | 2 +- core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp | 2 +- core/fpdfapi/fpdf_render/fpdf_render_image.cpp | 2 +- core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp | 2 +- core/fxcodec/JBig2_DocumentContext.h | 34 +++ core/fxcodec/codec/ccodec_iccmodule.h | 2 +- core/fxcodec/codec/ccodec_jbig2module.h | 2 +- core/fxcodec/codec/ccodec_progressivedecoder.h | 238 +++++++++++++++++++++ core/fxcodec/codec/codec_int.h | 2 +- core/fxcodec/codec/fx_codec.cpp | 2 +- core/fxcodec/codec/fx_codec_bmp.cpp | 2 +- core/fxcodec/codec/fx_codec_fax.cpp | 2 +- core/fxcodec/codec/fx_codec_flate.cpp | 2 +- core/fxcodec/codec/fx_codec_gif.cpp | 2 +- core/fxcodec/codec/fx_codec_icc.cpp | 2 +- core/fxcodec/codec/fx_codec_jbig.cpp | 2 +- core/fxcodec/codec/fx_codec_jpeg.cpp | 2 +- core/fxcodec/codec/fx_codec_jpx_opj.cpp | 2 +- core/fxcodec/codec/fx_codec_png.cpp | 2 +- core/fxcodec/codec/fx_codec_progress.cpp | 4 +- core/fxcodec/codec/fx_codec_tiff.cpp | 2 +- .../codec/include/ccodec_progressivedecoder.h | 238 --------------------- core/fxcodec/fx_codec.h | 129 +++++++++++ core/fxcodec/fx_codec_def.h | 92 ++++++++ core/fxcodec/include/DEPS | 3 - core/fxcodec/include/JBig2_DocumentContext.h | 34 --- core/fxcodec/include/fx_codec.h | 129 ----------- core/fxcodec/include/fx_codec_def.h | 92 -------- core/fxcodec/jbig2/JBig2_Context.h | 2 +- core/fxcodec/jbig2/JBig2_GrdProc.cpp | 2 +- core/fxcodec/jbig2/JBig2_GrdProc.h | 2 +- core/fxge/agg/fx_agg_driver.cpp | 2 +- core/fxge/dib/fx_dib_composite.cpp | 2 +- core/fxge/dib/fx_dib_convert.cpp | 2 +- core/fxge/dib/fx_dib_main.cpp | 2 +- core/fxge/ge/fx_ge_text.cpp | 2 +- core/fxge/skia/fx_skia_device.cpp | 2 +- core/fxge/win32/fx_win32_device.cpp | 2 +- fpdfsdk/DEPS | 2 +- fpdfsdk/fpdfview.cpp | 2 +- xfa/fxbarcode/DEPS | 4 +- xfa/fxfa/app/DEPS | 4 +- xfa/fxfa/app/xfa_ffwidget.cpp | 4 +- xfa/fxfa/include/DEPS | 2 +- xfa/fxfa/include/xfa_ffwidget.h | 2 +- xfa/fxfa/parser/DEPS | 2 +- xfa/fxfa/parser/xfa_localemgr.cpp | 2 +- 53 files changed, 544 insertions(+), 547 deletions(-) create mode 100644 core/fxcodec/JBig2_DocumentContext.h create mode 100644 core/fxcodec/codec/ccodec_progressivedecoder.h delete mode 100644 core/fxcodec/codec/include/ccodec_progressivedecoder.h create mode 100644 core/fxcodec/fx_codec.h create mode 100644 core/fxcodec/fx_codec_def.h delete mode 100644 core/fxcodec/include/DEPS delete mode 100644 core/fxcodec/include/JBig2_DocumentContext.h delete mode 100644 core/fxcodec/include/fx_codec.h delete mode 100644 core/fxcodec/include/fx_codec_def.h diff --git a/BUILD.gn b/BUILD.gn index 4e38d58b6e..8574de51a5 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -569,6 +569,7 @@ static_library("fpdftext") { static_library("fxcodec") { sources = [ + "core/fxcodec/JBig2_DocumentContext.h", "core/fxcodec/codec/ccodec_basicmodule.h", "core/fxcodec/codec/ccodec_faxmodule.h", "core/fxcodec/codec/ccodec_flatemodule.h", @@ -585,9 +586,8 @@ static_library("fxcodec") { "core/fxcodec/codec/fx_codec_jbig.cpp", "core/fxcodec/codec/fx_codec_jpeg.cpp", "core/fxcodec/codec/fx_codec_jpx_opj.cpp", - "core/fxcodec/include/JBig2_DocumentContext.h", - "core/fxcodec/include/fx_codec.h", - "core/fxcodec/include/fx_codec_def.h", + "core/fxcodec/fx_codec.h", + "core/fxcodec/fx_codec_def.h", "core/fxcodec/jbig2/JBig2_ArithDecoder.cpp", "core/fxcodec/jbig2/JBig2_ArithDecoder.h", "core/fxcodec/jbig2/JBig2_ArithIntDecoder.cpp", @@ -645,13 +645,13 @@ static_library("fxcodec") { "core/fxcodec/codec/ccodec_bmpmodule.h", "core/fxcodec/codec/ccodec_gifmodule.h", "core/fxcodec/codec/ccodec_pngmodule.h", + "core/fxcodec/codec/ccodec_progressivedecoder.h", "core/fxcodec/codec/ccodec_tiffmodule.h", "core/fxcodec/codec/fx_codec_bmp.cpp", "core/fxcodec/codec/fx_codec_gif.cpp", "core/fxcodec/codec/fx_codec_png.cpp", "core/fxcodec/codec/fx_codec_progress.cpp", "core/fxcodec/codec/fx_codec_tiff.cpp", - "core/fxcodec/codec/include/ccodec_progressivedecoder.h", "core/fxcodec/lbmp/fx_bmp.cpp", "core/fxcodec/lbmp/fx_bmp.h", "core/fxcodec/lgif/fx_gif.cpp", diff --git a/core/fpdfapi/cpdf_modulemgr.cpp b/core/fpdfapi/cpdf_modulemgr.cpp index 26a0ff37e6..a8ecc6d154 100644 --- a/core/fpdfapi/cpdf_modulemgr.cpp +++ b/core/fpdfapi/cpdf_modulemgr.cpp @@ -7,7 +7,7 @@ #include "core/fpdfapi/cpdf_modulemgr.h" #include "core/fpdfapi/fpdf_page/cpdf_pagemodule.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" namespace { diff --git a/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp b/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp index 53e0807841..d7469b6d98 100644 --- a/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_colorspace.cpp @@ -18,7 +18,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/cpdf_string.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" namespace { diff --git a/core/fpdfapi/fpdf_page/cpdf_image.cpp b/core/fpdfapi/fpdf_page/cpdf_image.cpp index 750dbd1a50..5a1f9af037 100644 --- a/core/fpdfapi/fpdf_page/cpdf_image.cpp +++ b/core/fpdfapi/fpdf_page/cpdf_image.cpp @@ -19,7 +19,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_string.h" #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" #include "core/fpdfapi/fpdf_render/render_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/include/fx_dib.h" CPDF_Image::CPDF_Image(CPDF_Document* pDoc) diff --git a/core/fpdfapi/fpdf_page/fpdf_page_colors.cpp b/core/fpdfapi/fpdf_page/fpdf_page_colors.cpp index f900640a63..472e8751d7 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_colors.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_colors.cpp @@ -17,7 +17,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" #include "core/fpdfapi/fpdf_parser/cpdf_string.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" namespace { diff --git a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp index 5a25c308fd..ddd640ec7f 100644 --- a/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp +++ b/core/fpdfapi/fpdf_page/fpdf_page_parser_old.cpp @@ -27,7 +27,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_string.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_decode.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_ext.h" #include "core/fxcrt/include/fx_safe_types.h" #include "core/fxge/include/cfx_fxgedevice.h" diff --git a/core/fpdfapi/fpdf_parser/cpdf_document.cpp b/core/fpdfapi/fpdf_parser/cpdf_document.cpp index cf8bed67ef..30a50f54ae 100644 --- a/core/fpdfapi/fpdf_parser/cpdf_document.cpp +++ b/core/fpdfapi/fpdf_parser/cpdf_document.cpp @@ -20,7 +20,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_reference.h" #include "core/fpdfapi/fpdf_parser/cpdf_stream.h" #include "core/fpdfapi/fpdf_render/render_int.h" -#include "core/fxcodec/include/JBig2_DocumentContext.h" +#include "core/fxcodec/JBig2_DocumentContext.h" #include "core/fxge/include/cfx_unicodeencoding.h" #include "core/fxge/include/fx_font.h" #include "third_party/base/stl_util.h" diff --git a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp index 9af8a9292e..62350cdd1e 100644 --- a/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp +++ b/core/fpdfapi/fpdf_parser/fpdf_parser_decode.cpp @@ -16,7 +16,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_array.h" #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/fpdf_parser_utility.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_ext.h" #include "third_party/base/stl_util.h" diff --git a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp index 62b92c605b..8867af0df1 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_image.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_image.cpp @@ -24,7 +24,7 @@ #include "core/fpdfapi/fpdf_render/cpdf_rendercontext.h" #include "core/fpdfapi/fpdf_render/cpdf_renderoptions.h" #include "core/fpdfdoc/cpdf_occontext.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_safe_types.h" #include "core/fxge/include/cfx_fxgedevice.h" #include "core/fxge/include/cfx_pathdata.h" diff --git a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp index aa590dfc33..d464eab6e1 100644 --- a/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp +++ b/core/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp @@ -18,7 +18,7 @@ #include "core/fpdfapi/fpdf_parser/cpdf_dictionary.h" #include "core/fpdfapi/fpdf_parser/cpdf_document.h" #include "core/fpdfapi/fpdf_render/cpdf_pagerendercache.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_safe_types.h" namespace { diff --git a/core/fxcodec/JBig2_DocumentContext.h b/core/fxcodec/JBig2_DocumentContext.h new file mode 100644 index 0000000000..9e5d3b3d3b --- /dev/null +++ b/core/fxcodec/JBig2_DocumentContext.h @@ -0,0 +1,34 @@ +// Copyright 2016 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. +// +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCODEC_JBIG2_DOCUMENTCONTEXT_H_ +#define CORE_FXCODEC_JBIG2_DOCUMENTCONTEXT_H_ + +#include +#include +#include + +class CJBig2_SymbolDict; + +using CJBig2_CacheKey = std::pair; +using CJBig2_CachePair = + std::pair>; + +// Holds per-document JBig2 related data. +class JBig2_DocumentContext { + public: + JBig2_DocumentContext(); + ~JBig2_DocumentContext(); + + std::list* GetSymbolDictCache() { + return &m_SymbolDictCache; + } + + private: + std::list m_SymbolDictCache; +}; + +#endif // CORE_FXCODEC_JBIG2_DOCUMENTCONTEXT_H_ diff --git a/core/fxcodec/codec/ccodec_iccmodule.h b/core/fxcodec/codec/ccodec_iccmodule.h index 8d4d0e9ca0..f97065b971 100644 --- a/core/fxcodec/codec/ccodec_iccmodule.h +++ b/core/fxcodec/codec/ccodec_iccmodule.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_CODEC_CCODEC_ICCMODULE_H_ #define CORE_FXCODEC_CODEC_CCODEC_ICCMODULE_H_ -#include "core/fxcodec/include/fx_codec_def.h" +#include "core/fxcodec/fx_codec_def.h" #include "core/fxcrt/include/fx_string.h" #include "core/fxcrt/include/fx_system.h" diff --git a/core/fxcodec/codec/ccodec_jbig2module.h b/core/fxcodec/codec/ccodec_jbig2module.h index 765a11fcb4..d2b97b82a0 100644 --- a/core/fxcodec/codec/ccodec_jbig2module.h +++ b/core/fxcodec/codec/ccodec_jbig2module.h @@ -9,7 +9,7 @@ #include -#include "core/fxcodec/include/fx_codec_def.h" +#include "core/fxcodec/fx_codec_def.h" #include "core/fxcrt/include/fx_basic.h" class CJBig2_Context; diff --git a/core/fxcodec/codec/ccodec_progressivedecoder.h b/core/fxcodec/codec/ccodec_progressivedecoder.h new file mode 100644 index 0000000000..8540493648 --- /dev/null +++ b/core/fxcodec/codec/ccodec_progressivedecoder.h @@ -0,0 +1,238 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCODEC_CODEC_CCODEC_PROGRESSIVEDECODER_H_ +#define CORE_FXCODEC_CODEC_CCODEC_PROGRESSIVEDECODER_H_ + +#include + +#include "core/fxcodec/fx_codec_def.h" +#include "core/fxcrt/include/fx_system.h" +#include "core/fxge/include/fx_dib.h" + +class CCodec_BmpModule; +class CCodec_GifContext; +class CCodec_GifModule; +class CCodec_JpegModule; +class CCodec_ModuleMgr; +class CCodec_PngContext; +class CCodec_TiffContext; +class CFX_DIBAttribute; +class IFX_FileRead; +class IFX_Pause; +struct FXBMP_Context; +struct FXGIF_Context; +struct FXJPEG_Context; +struct FXPNG_Context; + +class CCodec_ProgressiveDecoder { + public: + enum FXCodec_Format { + FXCodec_Invalid = 0, + FXCodec_1bppGray = 0x101, + FXCodec_1bppRgb = 0x001, + FXCodec_8bppGray = 0x108, + FXCodec_8bppRgb = 0x008, + FXCodec_Rgb = 0x018, + FXCodec_Rgb32 = 0x020, + FXCodec_Argb = 0x220, + FXCodec_Cmyk = 0x120 + }; + + explicit CCodec_ProgressiveDecoder(CCodec_ModuleMgr* pCodecMgr); + ~CCodec_ProgressiveDecoder(); + + FXCODEC_STATUS LoadImageInfo(IFX_FileRead* pFile, + FXCODEC_IMAGE_TYPE imageType, + CFX_DIBAttribute* pAttribute, + bool bSkipImageTypeCheck); + + FXCODEC_IMAGE_TYPE GetType() const { return m_imagType; } + int32_t GetWidth() const { return m_SrcWidth; } + int32_t GetHeight() const { return m_SrcHeight; } + int32_t GetNumComponents() const { return m_SrcComponents; } + int32_t GetBPC() const { return m_SrcBPC; } + void SetClipBox(FX_RECT* clip); + + FXCODEC_STATUS GetFrames(int32_t& frames, IFX_Pause* pPause = nullptr); + FXCODEC_STATUS StartDecode(CFX_DIBitmap* pDIBitmap, + int start_x, + int start_y, + int size_x, + int size_y, + int32_t frames = 0, + FX_BOOL bInterpol = TRUE); + + FXCODEC_STATUS ContinueDecode(IFX_Pause* pPause = nullptr); + + struct PixelWeight { + int m_SrcStart; + int m_SrcEnd; + int m_Weights[1]; + }; + + class CFXCODEC_WeightTable { + public: + CFXCODEC_WeightTable(); + ~CFXCODEC_WeightTable(); + + void Calc(int dest_len, + int dest_min, + int dest_max, + int src_len, + int src_min, + int src_max, + FX_BOOL bInterpol); + PixelWeight* GetPixelWeight(int pixel) { + return reinterpret_cast(m_pWeightTables.data() + + (pixel - m_DestMin) * m_ItemSize); + } + + int m_DestMin; + int m_ItemSize; + std::vector m_pWeightTables; + }; + + class CFXCODEC_HorzTable { + public: + CFXCODEC_HorzTable(); + ~CFXCODEC_HorzTable(); + + void Calc(int dest_len, int src_len, FX_BOOL bInterpol); + PixelWeight* GetPixelWeight(int pixel) { + return reinterpret_cast(m_pWeightTables.data() + + pixel * m_ItemSize); + } + + int m_ItemSize; + std::vector m_pWeightTables; + }; + + class CFXCODEC_VertTable { + public: + CFXCODEC_VertTable(); + ~CFXCODEC_VertTable(); + + void Calc(int dest_len, int src_len); + PixelWeight* GetPixelWeight(int pixel) { + return reinterpret_cast(m_pWeightTables.data() + + pixel * m_ItemSize); + } + int m_ItemSize; + std::vector m_pWeightTables; + }; + + IFX_FileRead* m_pFile; + CCodec_ModuleMgr* m_pCodecMgr; + FXJPEG_Context* m_pJpegContext; + FXPNG_Context* m_pPngContext; + FXGIF_Context* m_pGifContext; + FXBMP_Context* m_pBmpContext; + CCodec_TiffContext* m_pTiffContext; + FXCODEC_IMAGE_TYPE m_imagType; + uint32_t m_offSet; + uint8_t* m_pSrcBuf; + uint32_t m_SrcSize; + uint8_t* m_pDecodeBuf; + int m_ScanlineSize; + CFX_DIBitmap* m_pDeviceBitmap; + FX_BOOL m_bInterpol; + CFXCODEC_WeightTable m_WeightHorz; + CFXCODEC_VertTable m_WeightVert; + CFXCODEC_HorzTable m_WeightHorzOO; + int m_SrcWidth; + int m_SrcHeight; + int m_SrcComponents; + int m_SrcBPC; + FX_RECT m_clipBox; + int m_startX; + int m_startY; + int m_sizeX; + int m_sizeY; + int m_TransMethod; + FX_ARGB* m_pSrcPalette; + int m_SrcPaletteNumber; + int m_SrcRow; + FXCodec_Format m_SrcFormat; + int m_SrcPassNumber; + int m_FrameNumber; + int m_FrameCur; + int m_GifBgIndex; + uint8_t* m_pGifPalette; + int32_t m_GifPltNumber; + int m_GifTransIndex; + FX_RECT m_GifFrameRect; + FX_BOOL m_BmpIsTopBottom; + FXCODEC_STATUS m_status; + + protected: + static FX_BOOL PngReadHeaderFunc(void* pModule, + int width, + int height, + int bpc, + int pass, + int* color_type, + double* gamma); + static FX_BOOL PngAskScanlineBufFunc(void* pModule, + int line, + uint8_t*& src_buf); + static void PngFillScanlineBufCompletedFunc(void* pModule, + int pass, + int line); + static void GifRecordCurrentPositionCallback(void* pModule, + uint32_t& cur_pos); + static uint8_t* GifAskLocalPaletteBufCallback(void* pModule, + int32_t frame_num, + int32_t pal_size); + static FX_BOOL GifInputRecordPositionBufCallback(void* pModule, + uint32_t rcd_pos, + const FX_RECT& img_rc, + int32_t pal_num, + void* pal_ptr, + int32_t delay_time, + FX_BOOL user_input, + int32_t trans_index, + int32_t disposal_method, + FX_BOOL interlace); + static void GifReadScanlineCallback(void* pModule, + int32_t row_num, + uint8_t* row_buf); + static FX_BOOL BmpInputImagePositionBufCallback(void* pModule, + uint32_t rcd_pos); + static void BmpReadScanlineCallback(void* pModule, + int32_t row_num, + uint8_t* row_buf); + + FX_BOOL DetectImageType(FXCODEC_IMAGE_TYPE imageType, + CFX_DIBAttribute* pAttribute); + void GetDownScale(int& down_scale); + void GetTransMethod(FXDIB_Format des_format, FXCodec_Format src_format); + void ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, + int32_t des_line, + uint8_t* src_scan, + FXCodec_Format src_format); + void Resample(CFX_DIBitmap* pDeviceBitmap, + int32_t src_line, + uint8_t* src_scan, + FXCodec_Format src_format); + void ResampleVert(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row); + FX_BOOL JpegReadMoreData(CCodec_JpegModule* pJpegModule, + FXCODEC_STATUS& err_status); + void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, + int32_t des_line, + uint8_t* src_scan, + FXCodec_Format src_format); + FX_BOOL GifReadMoreData(CCodec_GifModule* pGifModule, + FXCODEC_STATUS& err_status); + void GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceBitmap, + double scale_y, + int des_row); + FX_BOOL BmpReadMoreData(CCodec_BmpModule* pBmpModule, + FXCODEC_STATUS& err_status); + void ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row); +}; + +#endif // CORE_FXCODEC_CODEC_CCODEC_PROGRESSIVEDECODER_H_ diff --git a/core/fxcodec/codec/codec_int.h b/core/fxcodec/codec/codec_int.h index 566bbc3c9b..edd5a67a25 100644 --- a/core/fxcodec/codec/codec_int.h +++ b/core/fxcodec/codec/codec_int.h @@ -14,7 +14,7 @@ #include #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcodec/jbig2/JBig2_Context.h" #include "third_party/libopenjpeg20/openjpeg.h" diff --git a/core/fxcodec/codec/fx_codec.cpp b/core/fxcodec/codec/fx_codec.cpp index 7f0c8ad225..60a64a1ab6 100644 --- a/core/fxcodec/codec/fx_codec.cpp +++ b/core/fxcodec/codec/fx_codec.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include #include diff --git a/core/fxcodec/codec/fx_codec_bmp.cpp b/core/fxcodec/codec/fx_codec_bmp.cpp index beda53c05b..c58aefbef7 100644 --- a/core/fxcodec/codec/fx_codec_bmp.cpp +++ b/core/fxcodec/codec/fx_codec_bmp.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcodec/lbmp/fx_bmp.h" #include "core/fxge/include/fx_dib.h" struct FXBMP_Context { diff --git a/core/fxcodec/codec/fx_codec_fax.cpp b/core/fxcodec/codec/fx_codec_fax.cpp index 91e6f9a7be..336c35b8d4 100644 --- a/core/fxcodec/codec/fx_codec_fax.cpp +++ b/core/fxcodec/codec/fx_codec_fax.cpp @@ -8,7 +8,7 @@ #include #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" namespace { diff --git a/core/fxcodec/codec/fx_codec_flate.cpp b/core/fxcodec/codec/fx_codec_flate.cpp index fd86cf3380..c34aabbcab 100644 --- a/core/fxcodec/codec/fx_codec_flate.cpp +++ b/core/fxcodec/codec/fx_codec_flate.cpp @@ -9,7 +9,7 @@ #include #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_ext.h" #include "third_party/zlib_v128/zlib.h" diff --git a/core/fxcodec/codec/fx_codec_gif.cpp b/core/fxcodec/codec/fx_codec_gif.cpp index f04192ebef..f02dace23e 100644 --- a/core/fxcodec/codec/fx_codec_gif.cpp +++ b/core/fxcodec/codec/fx_codec_gif.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcodec/lgif/fx_gif.h" #include "core/fxge/include/fx_dib.h" struct FXGIF_Context { diff --git a/core/fxcodec/codec/fx_codec_icc.cpp b/core/fxcodec/codec/fx_codec_icc.cpp index b5060a9fb6..8e48bfbfea 100644 --- a/core/fxcodec/codec/fx_codec_icc.cpp +++ b/core/fxcodec/codec/fx_codec_icc.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "third_party/lcms2-2.6/include/lcms2.h" const uint32_t N_COMPONENT_LAB = 3; diff --git a/core/fxcodec/codec/fx_codec_jbig.cpp b/core/fxcodec/codec/fx_codec_jbig.cpp index 650d616a73..93e5494ea0 100644 --- a/core/fxcodec/codec/fx_codec_jbig.cpp +++ b/core/fxcodec/codec/fx_codec_jbig.cpp @@ -9,7 +9,7 @@ #include #include "core/fpdfapi/fpdf_parser/cpdf_stream_acc.h" -#include "core/fxcodec/include/JBig2_DocumentContext.h" +#include "core/fxcodec/JBig2_DocumentContext.h" #include "core/fxcodec/jbig2/JBig2_Context.h" #include "core/fxcodec/jbig2/JBig2_Image.h" #include "core/fxcrt/include/fx_memory.h" diff --git a/core/fxcodec/codec/fx_codec_jpeg.cpp b/core/fxcodec/codec/fx_codec_jpeg.cpp index c2814a4b4c..29c6f8c423 100644 --- a/core/fxcodec/codec/fx_codec_jpeg.cpp +++ b/core/fxcodec/codec/fx_codec_jpeg.cpp @@ -7,7 +7,7 @@ #include #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_safe_types.h" #include "core/fxge/include/fx_dib.h" diff --git a/core/fxcodec/codec/fx_codec_jpx_opj.cpp b/core/fxcodec/codec/fx_codec_jpx_opj.cpp index d5a95eef89..219b1a0a12 100644 --- a/core/fxcodec/codec/fx_codec_jpx_opj.cpp +++ b/core/fxcodec/codec/fx_codec_jpx_opj.cpp @@ -10,7 +10,7 @@ #include "core/fpdfapi/fpdf_page/cpdf_colorspace.h" #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_safe_types.h" #include "third_party/lcms2-2.6/include/lcms2.h" #include "third_party/libopenjpeg20/openjpeg.h" diff --git a/core/fxcodec/codec/fx_codec_png.cpp b/core/fxcodec/codec/fx_codec_png.cpp index 9f7faa68e0..bfbdf6c675 100644 --- a/core/fxcodec/codec/fx_codec_png.cpp +++ b/core/fxcodec/codec/fx_codec_png.cpp @@ -7,7 +7,7 @@ #include #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/include/fx_dib.h" extern "C" { diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp index 9ac6913788..d468296acd 100644 --- a/core/fxcodec/codec/fx_codec_progress.cpp +++ b/core/fxcodec/codec/fx_codec_progress.cpp @@ -4,11 +4,11 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcodec/codec/include/ccodec_progressivedecoder.h" +#include "core/fxcodec/codec/ccodec_progressivedecoder.h" #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/include/fx_dib.h" #include "third_party/base/numerics/safe_math.h" diff --git a/core/fxcodec/codec/fx_codec_tiff.cpp b/core/fxcodec/codec/fx_codec_tiff.cpp index 2a00bb2d20..d4e5ddeeb8 100644 --- a/core/fxcodec/codec/fx_codec_tiff.cpp +++ b/core/fxcodec/codec/fx_codec_tiff.cpp @@ -5,7 +5,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #include "core/fxcodec/codec/codec_int.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/include/fx_dib.h" extern "C" { diff --git a/core/fxcodec/codec/include/ccodec_progressivedecoder.h b/core/fxcodec/codec/include/ccodec_progressivedecoder.h deleted file mode 100644 index 04b21da5ee..0000000000 --- a/core/fxcodec/codec/include/ccodec_progressivedecoder.h +++ /dev/null @@ -1,238 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCODEC_CODEC_INCLUDE_CCODEC_PROGRESSIVEDECODER_H_ -#define CORE_FXCODEC_CODEC_INCLUDE_CCODEC_PROGRESSIVEDECODER_H_ - -#include - -#include "core/fxcodec/include/fx_codec_def.h" -#include "core/fxcrt/include/fx_system.h" -#include "core/fxge/include/fx_dib.h" - -class CCodec_BmpModule; -class CCodec_GifContext; -class CCodec_GifModule; -class CCodec_JpegModule; -class CCodec_ModuleMgr; -class CCodec_PngContext; -class CCodec_TiffContext; -class CFX_DIBAttribute; -class IFX_FileRead; -class IFX_Pause; -struct FXBMP_Context; -struct FXGIF_Context; -struct FXJPEG_Context; -struct FXPNG_Context; - -class CCodec_ProgressiveDecoder { - public: - enum FXCodec_Format { - FXCodec_Invalid = 0, - FXCodec_1bppGray = 0x101, - FXCodec_1bppRgb = 0x001, - FXCodec_8bppGray = 0x108, - FXCodec_8bppRgb = 0x008, - FXCodec_Rgb = 0x018, - FXCodec_Rgb32 = 0x020, - FXCodec_Argb = 0x220, - FXCodec_Cmyk = 0x120 - }; - - explicit CCodec_ProgressiveDecoder(CCodec_ModuleMgr* pCodecMgr); - ~CCodec_ProgressiveDecoder(); - - FXCODEC_STATUS LoadImageInfo(IFX_FileRead* pFile, - FXCODEC_IMAGE_TYPE imageType, - CFX_DIBAttribute* pAttribute, - bool bSkipImageTypeCheck); - - FXCODEC_IMAGE_TYPE GetType() const { return m_imagType; } - int32_t GetWidth() const { return m_SrcWidth; } - int32_t GetHeight() const { return m_SrcHeight; } - int32_t GetNumComponents() const { return m_SrcComponents; } - int32_t GetBPC() const { return m_SrcBPC; } - void SetClipBox(FX_RECT* clip); - - FXCODEC_STATUS GetFrames(int32_t& frames, IFX_Pause* pPause = nullptr); - FXCODEC_STATUS StartDecode(CFX_DIBitmap* pDIBitmap, - int start_x, - int start_y, - int size_x, - int size_y, - int32_t frames = 0, - FX_BOOL bInterpol = TRUE); - - FXCODEC_STATUS ContinueDecode(IFX_Pause* pPause = nullptr); - - struct PixelWeight { - int m_SrcStart; - int m_SrcEnd; - int m_Weights[1]; - }; - - class CFXCODEC_WeightTable { - public: - CFXCODEC_WeightTable(); - ~CFXCODEC_WeightTable(); - - void Calc(int dest_len, - int dest_min, - int dest_max, - int src_len, - int src_min, - int src_max, - FX_BOOL bInterpol); - PixelWeight* GetPixelWeight(int pixel) { - return reinterpret_cast(m_pWeightTables.data() + - (pixel - m_DestMin) * m_ItemSize); - } - - int m_DestMin; - int m_ItemSize; - std::vector m_pWeightTables; - }; - - class CFXCODEC_HorzTable { - public: - CFXCODEC_HorzTable(); - ~CFXCODEC_HorzTable(); - - void Calc(int dest_len, int src_len, FX_BOOL bInterpol); - PixelWeight* GetPixelWeight(int pixel) { - return reinterpret_cast(m_pWeightTables.data() + - pixel * m_ItemSize); - } - - int m_ItemSize; - std::vector m_pWeightTables; - }; - - class CFXCODEC_VertTable { - public: - CFXCODEC_VertTable(); - ~CFXCODEC_VertTable(); - - void Calc(int dest_len, int src_len); - PixelWeight* GetPixelWeight(int pixel) { - return reinterpret_cast(m_pWeightTables.data() + - pixel * m_ItemSize); - } - int m_ItemSize; - std::vector m_pWeightTables; - }; - - IFX_FileRead* m_pFile; - CCodec_ModuleMgr* m_pCodecMgr; - FXJPEG_Context* m_pJpegContext; - FXPNG_Context* m_pPngContext; - FXGIF_Context* m_pGifContext; - FXBMP_Context* m_pBmpContext; - CCodec_TiffContext* m_pTiffContext; - FXCODEC_IMAGE_TYPE m_imagType; - uint32_t m_offSet; - uint8_t* m_pSrcBuf; - uint32_t m_SrcSize; - uint8_t* m_pDecodeBuf; - int m_ScanlineSize; - CFX_DIBitmap* m_pDeviceBitmap; - FX_BOOL m_bInterpol; - CFXCODEC_WeightTable m_WeightHorz; - CFXCODEC_VertTable m_WeightVert; - CFXCODEC_HorzTable m_WeightHorzOO; - int m_SrcWidth; - int m_SrcHeight; - int m_SrcComponents; - int m_SrcBPC; - FX_RECT m_clipBox; - int m_startX; - int m_startY; - int m_sizeX; - int m_sizeY; - int m_TransMethod; - FX_ARGB* m_pSrcPalette; - int m_SrcPaletteNumber; - int m_SrcRow; - FXCodec_Format m_SrcFormat; - int m_SrcPassNumber; - int m_FrameNumber; - int m_FrameCur; - int m_GifBgIndex; - uint8_t* m_pGifPalette; - int32_t m_GifPltNumber; - int m_GifTransIndex; - FX_RECT m_GifFrameRect; - FX_BOOL m_BmpIsTopBottom; - FXCODEC_STATUS m_status; - - protected: - static FX_BOOL PngReadHeaderFunc(void* pModule, - int width, - int height, - int bpc, - int pass, - int* color_type, - double* gamma); - static FX_BOOL PngAskScanlineBufFunc(void* pModule, - int line, - uint8_t*& src_buf); - static void PngFillScanlineBufCompletedFunc(void* pModule, - int pass, - int line); - static void GifRecordCurrentPositionCallback(void* pModule, - uint32_t& cur_pos); - static uint8_t* GifAskLocalPaletteBufCallback(void* pModule, - int32_t frame_num, - int32_t pal_size); - static FX_BOOL GifInputRecordPositionBufCallback(void* pModule, - uint32_t rcd_pos, - const FX_RECT& img_rc, - int32_t pal_num, - void* pal_ptr, - int32_t delay_time, - FX_BOOL user_input, - int32_t trans_index, - int32_t disposal_method, - FX_BOOL interlace); - static void GifReadScanlineCallback(void* pModule, - int32_t row_num, - uint8_t* row_buf); - static FX_BOOL BmpInputImagePositionBufCallback(void* pModule, - uint32_t rcd_pos); - static void BmpReadScanlineCallback(void* pModule, - int32_t row_num, - uint8_t* row_buf); - - FX_BOOL DetectImageType(FXCODEC_IMAGE_TYPE imageType, - CFX_DIBAttribute* pAttribute); - void GetDownScale(int& down_scale); - void GetTransMethod(FXDIB_Format des_format, FXCodec_Format src_format); - void ReSampleScanline(CFX_DIBitmap* pDeviceBitmap, - int32_t des_line, - uint8_t* src_scan, - FXCodec_Format src_format); - void Resample(CFX_DIBitmap* pDeviceBitmap, - int32_t src_line, - uint8_t* src_scan, - FXCodec_Format src_format); - void ResampleVert(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row); - FX_BOOL JpegReadMoreData(CCodec_JpegModule* pJpegModule, - FXCODEC_STATUS& err_status); - void PngOneOneMapResampleHorz(CFX_DIBitmap* pDeviceBitmap, - int32_t des_line, - uint8_t* src_scan, - FXCodec_Format src_format); - FX_BOOL GifReadMoreData(CCodec_GifModule* pGifModule, - FXCODEC_STATUS& err_status); - void GifDoubleLineResampleVert(CFX_DIBitmap* pDeviceBitmap, - double scale_y, - int des_row); - FX_BOOL BmpReadMoreData(CCodec_BmpModule* pBmpModule, - FXCODEC_STATUS& err_status); - void ResampleVertBT(CFX_DIBitmap* pDeviceBitmap, double scale_y, int des_row); -}; - -#endif // CORE_FXCODEC_CODEC_INCLUDE_CCODEC_PROGRESSIVEDECODER_H_ diff --git a/core/fxcodec/fx_codec.h b/core/fxcodec/fx_codec.h new file mode 100644 index 0000000000..5e00faf328 --- /dev/null +++ b/core/fxcodec/fx_codec.h @@ -0,0 +1,129 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCODEC_FX_CODEC_H_ +#define CORE_FXCODEC_FX_CODEC_H_ + +#include +#include +#include + +#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/fx_codec_def.h" +#include "core/fxcrt/include/fx_basic.h" +#include "core/fxcrt/include/fx_coordinates.h" + +class CFX_DIBSource; +class CJPX_Decoder; +class CPDF_ColorSpace; +class CPDF_StreamAcc; + +#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" + +class CCodec_ProgressiveDecoder; + +class CFX_DIBAttribute { + public: + CFX_DIBAttribute(); + ~CFX_DIBAttribute(); + + int32_t m_nXDPI; + int32_t m_nYDPI; + FX_FLOAT m_fAspectRatio; + uint16_t m_wDPIUnit; + CFX_ByteString m_strAuthor; + uint8_t m_strTime[20]; + int32_t m_nGifLeft; + int32_t m_nGifTop; + uint32_t* m_pGifLocalPalette; + uint32_t m_nGifLocalPalNum; + int32_t m_nBmpCompressType; + std::map m_Exif; +}; +#endif // PDF_ENABLE_XFA + +class CCodec_ModuleMgr { + public: + CCodec_ModuleMgr(); + ~CCodec_ModuleMgr(); + + CCodec_BasicModule* GetBasicModule() const { return m_pBasicModule.get(); } + CCodec_FaxModule* GetFaxModule() const { return m_pFaxModule.get(); } + CCodec_JpegModule* GetJpegModule() const { return m_pJpegModule.get(); } + CCodec_JpxModule* GetJpxModule() const { return m_pJpxModule.get(); } + CCodec_Jbig2Module* GetJbig2Module() const { return m_pJbig2Module.get(); } + CCodec_IccModule* GetIccModule() const { return m_pIccModule.get(); } + CCodec_FlateModule* GetFlateModule() const { return m_pFlateModule.get(); } + +#ifdef PDF_ENABLE_XFA + CCodec_ProgressiveDecoder* CreateProgressiveDecoder(); + CCodec_PngModule* GetPngModule() const { return m_pPngModule.get(); } + CCodec_GifModule* GetGifModule() const { return m_pGifModule.get(); } + CCodec_BmpModule* GetBmpModule() const { return m_pBmpModule.get(); } + CCodec_TiffModule* GetTiffModule() const { return m_pTiffModule.get(); } +#endif // PDF_ENABLE_XFA + + protected: + std::unique_ptr m_pBasicModule; + std::unique_ptr m_pFaxModule; + std::unique_ptr m_pJpegModule; + std::unique_ptr m_pJpxModule; + std::unique_ptr m_pJbig2Module; + std::unique_ptr m_pIccModule; + +#ifdef PDF_ENABLE_XFA + std::unique_ptr m_pPngModule; + std::unique_ptr m_pGifModule; + std::unique_ptr m_pBmpModule; + std::unique_ptr m_pTiffModule; +#endif // PDF_ENABLE_XFA + + std::unique_ptr m_pFlateModule; +}; + +void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels); +void sRGB_to_AdobeCMYK(FX_FLOAT R, + FX_FLOAT G, + FX_FLOAT B, + FX_FLOAT& c, + FX_FLOAT& m, + FX_FLOAT& y, + FX_FLOAT& k); +void AdobeCMYK_to_sRGB(FX_FLOAT c, + FX_FLOAT m, + FX_FLOAT y, + FX_FLOAT k, + FX_FLOAT& R, + FX_FLOAT& G, + FX_FLOAT& B); +void AdobeCMYK_to_sRGB1(uint8_t c, + uint8_t m, + uint8_t y, + uint8_t k, + uint8_t& R, + uint8_t& G, + uint8_t& B); +FX_BOOL MD5ComputeID(const void* buf, uint32_t dwSize, uint8_t ID[16]); +void FaxG4Decode(const uint8_t* src_buf, + uint32_t src_size, + int* pbitpos, + uint8_t* dest_buf, + int width, + int height, + int pitch); + +#endif // CORE_FXCODEC_FX_CODEC_H_ diff --git a/core/fxcodec/fx_codec_def.h b/core/fxcodec/fx_codec_def.h new file mode 100644 index 0000000000..fd23d78fa5 --- /dev/null +++ b/core/fxcodec/fx_codec_def.h @@ -0,0 +1,92 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#ifndef CORE_FXCODEC_FX_CODEC_DEF_H_ +#define CORE_FXCODEC_FX_CODEC_DEF_H_ + +enum FXCODEC_STATUS { + FXCODEC_STATUS_ERROR = -1, + FXCODEC_STATUS_FRAME_READY, + FXCODEC_STATUS_FRAME_TOBECONTINUE, + FXCODEC_STATUS_DECODE_READY, + FXCODEC_STATUS_DECODE_TOBECONTINUE, + FXCODEC_STATUS_DECODE_FINISH, +#ifdef PDF_ENABLE_XFA + FXCODEC_STATUS_ERR_MEMORY, +#endif // PDF_ENABLE_XFA + FXCODEC_STATUS_ERR_READ, + FXCODEC_STATUS_ERR_FLUSH, + FXCODEC_STATUS_ERR_FORMAT, + FXCODEC_STATUS_ERR_PARAMS +}; +#define JP2_SPACE_INVALID -1 +#define JPX_SPACE_INVALID -1 +#define JP2_SPACE_bilevel1 0 +#define JP2_SPACE_YCbCr1 1 +#define JP2_SPACE_YCbCr2 3 +#define JP2_SPACE_YCbCr3 4 +#define JP2_SPACE_PhotoYCC 9 +#define JP2_SPACE_CMY 11 +#define JP2_SPACE_CMYK 12 +#define JP2_SPACE_YCCK 13 +#define JP2_SPACE_CIELab 14 +#define JP2_SPACE_bilevel2 15 +#define JP2_SPACE_sRGB 16 +#define JP2_SPACE_sLUM 17 +#define JP2_SPACE_sYCC 18 +#define JP2_SPACE_CIEJab 19 +#define JP2_SPACE_esRGB 20 +#define JP2_SPACE_ROMMRGB 21 +#define JP2_SPACE_YPbPr60 22 +#define JP2_SPACE_YPbPr50 23 +#define JP2_SPACE_esYCC 24 +#define JP2_SPACE_iccLUM 100 +#define JP2_SPACE_iccRGB 101 +#define Icc_INTENT_PERCEPTUAL 0 +#define Icc_INTENT_RELATIVE_COLORIMETRIC 1 +#define Icc_INTENT_SATURATION 2 +#define Icc_INTENT_ABSOLUTE_COLORIMETRIC 3 +#define Icc_FORMAT_DEFAULT 0 +#define Icc_FORMAT_SWAP (1 << 10) +#define Icc_FLAGS_DEFAULT 0x0000 +#define Icc_FLAGS_BLACKPOINTCOMPENSATION 0x2000 +#define Icc_FLAGS_NOWHITEONWHITEFIXUP 0x0004 +#define Icc_FLAGS_HIGHRESPRECALC 0x0400 +#define Icc_FLAGS_LOWRESPRECALC 0x0800 +#define Icc_FLAGS_GAMUTCHECK 0x1000 +#define Icc_FLAGS_SOFTPROOFING 0x4000 +#define Icc_PARAMTYPE_NONE 0 +#define Icc_PARAMTYPE_BUFFER 1 +#define Icc_PARAMTYPE_PARAM 2 +#ifdef PDF_ENABLE_XFA +enum FXCODEC_IMAGE_TYPE { + FXCODEC_IMAGE_UNKNOWN = 0, + FXCODEC_IMAGE_BMP, + FXCODEC_IMAGE_JPG, + FXCODEC_IMAGE_PNG, + FXCODEC_IMAGE_GIF, + FXCODEC_IMAGE_TIF, + FXCODEC_IMAGE_MAX +}; +enum FXCODEC_RESUNIT { + FXCODEC_RESUNIT_NONE = 0, + FXCODEC_RESUNIT_INCH, + FXCODEC_RESUNIT_CENTIMETER, + FXCODEC_RESUNIT_METER +}; +#endif // PDF_ENABLE_XFA +#define EXIFTAG_USHORT_RESUNIT 296 +#define EXIFTAG_FLOAT_DPIX 282 +#define EXIFTAG_FLOAT_DPIY 283 +#define EXIFTAG_USHORT_ORIENTATION 274 +#define EXIFTAG_STRING_MANUFACTURER 271 +#define EXIFTAG_STRING_MODULE 272 +#define EXIFTAG_STRING_SOFTWARE 305 +#define EXIFTAG_STRING_IAMGEDESCRIPTION 270 +#define EXIFTAG_STRING_DATETIME 306 +#define EXIFTAG_STRING_COPYRIGHT 33432 + +#endif // CORE_FXCODEC_FX_CODEC_DEF_H_ diff --git a/core/fxcodec/include/DEPS b/core/fxcodec/include/DEPS deleted file mode 100644 index 548eb61a3b..0000000000 --- a/core/fxcodec/include/DEPS +++ /dev/null @@ -1,3 +0,0 @@ -include_rules = [ - '+third_party/zlib_v128/zlib.h', -] diff --git a/core/fxcodec/include/JBig2_DocumentContext.h b/core/fxcodec/include/JBig2_DocumentContext.h deleted file mode 100644 index d49bdfab8e..0000000000 --- a/core/fxcodec/include/JBig2_DocumentContext.h +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2016 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. -// -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCODEC_INCLUDE_JBIG2_DOCUMENTCONTEXT_H_ -#define CORE_FXCODEC_INCLUDE_JBIG2_DOCUMENTCONTEXT_H_ - -#include -#include -#include - -class CJBig2_SymbolDict; - -using CJBig2_CacheKey = std::pair; -using CJBig2_CachePair = - std::pair>; - -// Holds per-document JBig2 related data. -class JBig2_DocumentContext { - public: - JBig2_DocumentContext(); - ~JBig2_DocumentContext(); - - std::list* GetSymbolDictCache() { - return &m_SymbolDictCache; - } - - private: - std::list m_SymbolDictCache; -}; - -#endif // CORE_FXCODEC_INCLUDE_JBIG2_DOCUMENTCONTEXT_H_ diff --git a/core/fxcodec/include/fx_codec.h b/core/fxcodec/include/fx_codec.h deleted file mode 100644 index 8621db2b2c..0000000000 --- a/core/fxcodec/include/fx_codec.h +++ /dev/null @@ -1,129 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCODEC_INCLUDE_FX_CODEC_H_ -#define CORE_FXCODEC_INCLUDE_FX_CODEC_H_ - -#include -#include -#include - -#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/include/fx_codec_def.h" -#include "core/fxcrt/include/fx_basic.h" -#include "core/fxcrt/include/fx_coordinates.h" - -class CFX_DIBSource; -class CJPX_Decoder; -class CPDF_ColorSpace; -class CPDF_StreamAcc; - -#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" - -class CCodec_ProgressiveDecoder; - -class CFX_DIBAttribute { - public: - CFX_DIBAttribute(); - ~CFX_DIBAttribute(); - - int32_t m_nXDPI; - int32_t m_nYDPI; - FX_FLOAT m_fAspectRatio; - uint16_t m_wDPIUnit; - CFX_ByteString m_strAuthor; - uint8_t m_strTime[20]; - int32_t m_nGifLeft; - int32_t m_nGifTop; - uint32_t* m_pGifLocalPalette; - uint32_t m_nGifLocalPalNum; - int32_t m_nBmpCompressType; - std::map m_Exif; -}; -#endif // PDF_ENABLE_XFA - -class CCodec_ModuleMgr { - public: - CCodec_ModuleMgr(); - ~CCodec_ModuleMgr(); - - CCodec_BasicModule* GetBasicModule() const { return m_pBasicModule.get(); } - CCodec_FaxModule* GetFaxModule() const { return m_pFaxModule.get(); } - CCodec_JpegModule* GetJpegModule() const { return m_pJpegModule.get(); } - CCodec_JpxModule* GetJpxModule() const { return m_pJpxModule.get(); } - CCodec_Jbig2Module* GetJbig2Module() const { return m_pJbig2Module.get(); } - CCodec_IccModule* GetIccModule() const { return m_pIccModule.get(); } - CCodec_FlateModule* GetFlateModule() const { return m_pFlateModule.get(); } - -#ifdef PDF_ENABLE_XFA - CCodec_ProgressiveDecoder* CreateProgressiveDecoder(); - CCodec_PngModule* GetPngModule() const { return m_pPngModule.get(); } - CCodec_GifModule* GetGifModule() const { return m_pGifModule.get(); } - CCodec_BmpModule* GetBmpModule() const { return m_pBmpModule.get(); } - CCodec_TiffModule* GetTiffModule() const { return m_pTiffModule.get(); } -#endif // PDF_ENABLE_XFA - - protected: - std::unique_ptr m_pBasicModule; - std::unique_ptr m_pFaxModule; - std::unique_ptr m_pJpegModule; - std::unique_ptr m_pJpxModule; - std::unique_ptr m_pJbig2Module; - std::unique_ptr m_pIccModule; - -#ifdef PDF_ENABLE_XFA - std::unique_ptr m_pPngModule; - std::unique_ptr m_pGifModule; - std::unique_ptr m_pBmpModule; - std::unique_ptr m_pTiffModule; -#endif // PDF_ENABLE_XFA - - std::unique_ptr m_pFlateModule; -}; - -void ReverseRGB(uint8_t* pDestBuf, const uint8_t* pSrcBuf, int pixels); -void sRGB_to_AdobeCMYK(FX_FLOAT R, - FX_FLOAT G, - FX_FLOAT B, - FX_FLOAT& c, - FX_FLOAT& m, - FX_FLOAT& y, - FX_FLOAT& k); -void AdobeCMYK_to_sRGB(FX_FLOAT c, - FX_FLOAT m, - FX_FLOAT y, - FX_FLOAT k, - FX_FLOAT& R, - FX_FLOAT& G, - FX_FLOAT& B); -void AdobeCMYK_to_sRGB1(uint8_t c, - uint8_t m, - uint8_t y, - uint8_t k, - uint8_t& R, - uint8_t& G, - uint8_t& B); -FX_BOOL MD5ComputeID(const void* buf, uint32_t dwSize, uint8_t ID[16]); -void FaxG4Decode(const uint8_t* src_buf, - uint32_t src_size, - int* pbitpos, - uint8_t* dest_buf, - int width, - int height, - int pitch); - -#endif // CORE_FXCODEC_INCLUDE_FX_CODEC_H_ diff --git a/core/fxcodec/include/fx_codec_def.h b/core/fxcodec/include/fx_codec_def.h deleted file mode 100644 index fb1b5bcdac..0000000000 --- a/core/fxcodec/include/fx_codec_def.h +++ /dev/null @@ -1,92 +0,0 @@ -// Copyright 2014 PDFium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com - -#ifndef CORE_FXCODEC_INCLUDE_FX_CODEC_DEF_H_ -#define CORE_FXCODEC_INCLUDE_FX_CODEC_DEF_H_ - -enum FXCODEC_STATUS { - FXCODEC_STATUS_ERROR = -1, - FXCODEC_STATUS_FRAME_READY, - FXCODEC_STATUS_FRAME_TOBECONTINUE, - FXCODEC_STATUS_DECODE_READY, - FXCODEC_STATUS_DECODE_TOBECONTINUE, - FXCODEC_STATUS_DECODE_FINISH, -#ifdef PDF_ENABLE_XFA - FXCODEC_STATUS_ERR_MEMORY, -#endif // PDF_ENABLE_XFA - FXCODEC_STATUS_ERR_READ, - FXCODEC_STATUS_ERR_FLUSH, - FXCODEC_STATUS_ERR_FORMAT, - FXCODEC_STATUS_ERR_PARAMS -}; -#define JP2_SPACE_INVALID -1 -#define JPX_SPACE_INVALID -1 -#define JP2_SPACE_bilevel1 0 -#define JP2_SPACE_YCbCr1 1 -#define JP2_SPACE_YCbCr2 3 -#define JP2_SPACE_YCbCr3 4 -#define JP2_SPACE_PhotoYCC 9 -#define JP2_SPACE_CMY 11 -#define JP2_SPACE_CMYK 12 -#define JP2_SPACE_YCCK 13 -#define JP2_SPACE_CIELab 14 -#define JP2_SPACE_bilevel2 15 -#define JP2_SPACE_sRGB 16 -#define JP2_SPACE_sLUM 17 -#define JP2_SPACE_sYCC 18 -#define JP2_SPACE_CIEJab 19 -#define JP2_SPACE_esRGB 20 -#define JP2_SPACE_ROMMRGB 21 -#define JP2_SPACE_YPbPr60 22 -#define JP2_SPACE_YPbPr50 23 -#define JP2_SPACE_esYCC 24 -#define JP2_SPACE_iccLUM 100 -#define JP2_SPACE_iccRGB 101 -#define Icc_INTENT_PERCEPTUAL 0 -#define Icc_INTENT_RELATIVE_COLORIMETRIC 1 -#define Icc_INTENT_SATURATION 2 -#define Icc_INTENT_ABSOLUTE_COLORIMETRIC 3 -#define Icc_FORMAT_DEFAULT 0 -#define Icc_FORMAT_SWAP (1 << 10) -#define Icc_FLAGS_DEFAULT 0x0000 -#define Icc_FLAGS_BLACKPOINTCOMPENSATION 0x2000 -#define Icc_FLAGS_NOWHITEONWHITEFIXUP 0x0004 -#define Icc_FLAGS_HIGHRESPRECALC 0x0400 -#define Icc_FLAGS_LOWRESPRECALC 0x0800 -#define Icc_FLAGS_GAMUTCHECK 0x1000 -#define Icc_FLAGS_SOFTPROOFING 0x4000 -#define Icc_PARAMTYPE_NONE 0 -#define Icc_PARAMTYPE_BUFFER 1 -#define Icc_PARAMTYPE_PARAM 2 -#ifdef PDF_ENABLE_XFA -enum FXCODEC_IMAGE_TYPE { - FXCODEC_IMAGE_UNKNOWN = 0, - FXCODEC_IMAGE_BMP, - FXCODEC_IMAGE_JPG, - FXCODEC_IMAGE_PNG, - FXCODEC_IMAGE_GIF, - FXCODEC_IMAGE_TIF, - FXCODEC_IMAGE_MAX -}; -enum FXCODEC_RESUNIT { - FXCODEC_RESUNIT_NONE = 0, - FXCODEC_RESUNIT_INCH, - FXCODEC_RESUNIT_CENTIMETER, - FXCODEC_RESUNIT_METER -}; -#endif // PDF_ENABLE_XFA -#define EXIFTAG_USHORT_RESUNIT 296 -#define EXIFTAG_FLOAT_DPIX 282 -#define EXIFTAG_FLOAT_DPIY 283 -#define EXIFTAG_USHORT_ORIENTATION 274 -#define EXIFTAG_STRING_MANUFACTURER 271 -#define EXIFTAG_STRING_MODULE 272 -#define EXIFTAG_STRING_SOFTWARE 305 -#define EXIFTAG_STRING_IAMGEDESCRIPTION 270 -#define EXIFTAG_STRING_DATETIME 306 -#define EXIFTAG_STRING_COPYRIGHT 33432 - -#endif // CORE_FXCODEC_INCLUDE_FX_CODEC_DEF_H_ diff --git a/core/fxcodec/jbig2/JBig2_Context.h b/core/fxcodec/jbig2/JBig2_Context.h index 8ae00a9bad..ab94d9eb98 100644 --- a/core/fxcodec/jbig2/JBig2_Context.h +++ b/core/fxcodec/jbig2/JBig2_Context.h @@ -13,7 +13,7 @@ #include #include "core/fpdfapi/fpdf_parser/cpdf_object.h" -#include "core/fxcodec/include/fx_codec_def.h" +#include "core/fxcodec/fx_codec_def.h" #include "core/fxcodec/jbig2/JBig2_List.h" #include "core/fxcodec/jbig2/JBig2_Page.h" #include "core/fxcodec/jbig2/JBig2_Segment.h" diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.cpp b/core/fxcodec/jbig2/JBig2_GrdProc.cpp index b692909c01..344367dfa3 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.cpp +++ b/core/fxcodec/jbig2/JBig2_GrdProc.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcodec/jbig2/JBig2_ArithDecoder.h" #include "core/fxcodec/jbig2/JBig2_BitStream.h" #include "core/fxcodec/jbig2/JBig2_Image.h" diff --git a/core/fxcodec/jbig2/JBig2_GrdProc.h b/core/fxcodec/jbig2/JBig2_GrdProc.h index 6026798aad..ea9748ce80 100644 --- a/core/fxcodec/jbig2/JBig2_GrdProc.h +++ b/core/fxcodec/jbig2/JBig2_GrdProc.h @@ -7,7 +7,7 @@ #ifndef CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_ #define CORE_FXCODEC_JBIG2_JBIG2_GRDPROC_H_ -#include "core/fxcodec/include/fx_codec_def.h" +#include "core/fxcodec/fx_codec_def.h" #include "core/fxcrt/include/fx_coordinates.h" #include "core/fxcrt/include/fx_system.h" diff --git a/core/fxge/agg/fx_agg_driver.cpp b/core/fxge/agg/fx_agg_driver.cpp index 34d2a05d80..1c82620ca0 100644 --- a/core/fxge/agg/fx_agg_driver.cpp +++ b/core/fxge/agg/fx_agg_driver.cpp @@ -8,7 +8,7 @@ #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_memory.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/cfx_cliprgn.h" diff --git a/core/fxge/dib/fx_dib_composite.cpp b/core/fxge/dib/fx_dib_composite.cpp index 2ac455bfb5..fa4cc783df 100644 --- a/core/fxge/dib/fx_dib_composite.cpp +++ b/core/fxge/dib/fx_dib_composite.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/cfx_cliprgn.h" #include "core/fxge/include/cfx_gemodule.h" diff --git a/core/fxge/dib/fx_dib_convert.cpp b/core/fxge/dib/fx_dib_convert.cpp index cb64960953..829c2113f1 100644 --- a/core/fxge/dib/fx_dib_convert.cpp +++ b/core/fxge/dib/fx_dib_convert.cpp @@ -4,7 +4,7 @@ // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/include/fx_dib.h" class CFX_Palette { diff --git a/core/fxge/dib/fx_dib_main.cpp b/core/fxge/dib/fx_dib_main.cpp index 9575e6aac4..5b40b850b9 100644 --- a/core/fxge/dib/fx_dib_main.cpp +++ b/core/fxge/dib/fx_dib_main.cpp @@ -9,7 +9,7 @@ #include #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/dib/dib_int.h" #include "core/fxge/ge/cfx_cliprgn.h" #include "core/fxge/include/cfx_gemodule.h" diff --git a/core/fxge/ge/fx_ge_text.cpp b/core/fxge/ge/fx_ge_text.cpp index 415711f0cd..4612877980 100644 --- a/core/fxge/ge/fx_ge_text.cpp +++ b/core/fxge/ge/fx_ge_text.cpp @@ -8,7 +8,7 @@ #include #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_safe_types.h" #include "core/fxge/ge/fx_text_int.h" #include "core/fxge/include/cfx_pathdata.h" diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 55d66e037a..bcbe2d10f7 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -6,7 +6,7 @@ #include #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_memory.h" #include "core/fpdfapi/fpdf_page/cpdf_shadingpattern.h" diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 061bc0a4d0..e3d00d93f6 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -13,7 +13,7 @@ #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN64_DESKTOP_ #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_memory.h" #ifndef _SKIA_SUPPORT_ diff --git a/fpdfsdk/DEPS b/fpdfsdk/DEPS index 8fc863dda3..286d5888e7 100644 --- a/fpdfsdk/DEPS +++ b/fpdfsdk/DEPS @@ -6,7 +6,7 @@ include_rules = [ '+core/fpdfapi/fpdf_parser', '+core/fpdfapi/fpdf_render', '+core/fpdfdoc', - '+core/fxcodec/include', + '+core/fxcodec', '+core/fxcrt/include', '+core/fxge/include', '+public', diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index d6d7f3b8e8..2f00afad33 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -21,7 +21,7 @@ #include "core/fpdfdoc/cpdf_nametree.h" #include "core/fpdfdoc/cpdf_occontext.h" #include "core/fpdfdoc/cpdf_viewerpreferences.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_memory.h" #include "core/fxcrt/include/fx_safe_types.h" #include "core/fxge/include/cfx_fxgedevice.h" diff --git a/xfa/fxbarcode/DEPS b/xfa/fxbarcode/DEPS index 4d9d2029e0..535f39b1eb 100644 --- a/xfa/fxbarcode/DEPS +++ b/xfa/fxbarcode/DEPS @@ -1,4 +1,4 @@ include_rules = [ - '+core/fxcodec/include', - '+core/fxcodec/codec/include', + '+core/fxcodec', + '+core/fxcodec/codec', ] diff --git a/xfa/fxfa/app/DEPS b/xfa/fxfa/app/DEPS index abdf53d98f..fed4e8526d 100644 --- a/xfa/fxfa/app/DEPS +++ b/xfa/fxfa/app/DEPS @@ -4,6 +4,6 @@ include_rules = [ '+core/fpdfapi/fpdf_page', '+core/fpdfapi/fpdf_parser', '+core/fpdfdoc', - '+core/fxcodec/include', - '+core/fxcodec/codec/include', + '+core/fxcodec', + '+core/fxcodec/codec', ] diff --git a/xfa/fxfa/app/xfa_ffwidget.cpp b/xfa/fxfa/app/xfa_ffwidget.cpp index 2ef9840c1a..31cbf25928 100644 --- a/xfa/fxfa/app/xfa_ffwidget.cpp +++ b/xfa/fxfa/app/xfa_ffwidget.cpp @@ -10,8 +10,8 @@ #include #include "core/fpdfapi/fpdf_page/cpdf_pageobjectholder.h" -#include "core/fxcodec/codec/include/ccodec_progressivedecoder.h" -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/codec/ccodec_progressivedecoder.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxge/include/cfx_gemodule.h" #include "core/fxge/include/cfx_pathdata.h" #include "core/fxge/include/cfx_renderdevice.h" diff --git a/xfa/fxfa/include/DEPS b/xfa/fxfa/include/DEPS index 97ccb1faa6..1519ceaa93 100644 --- a/xfa/fxfa/include/DEPS +++ b/xfa/fxfa/include/DEPS @@ -1,3 +1,3 @@ include_rules = [ - '+core/fxcodec/include', + '+core/fxcodec', ] diff --git a/xfa/fxfa/include/xfa_ffwidget.h b/xfa/fxfa/include/xfa_ffwidget.h index ca325ee33d..7b6130f09b 100644 --- a/xfa/fxfa/include/xfa_ffwidget.h +++ b/xfa/fxfa/include/xfa_ffwidget.h @@ -9,7 +9,7 @@ #include -#include "core/fxcodec/include/fx_codec_def.h" +#include "core/fxcodec/fx_codec_def.h" #include "core/fxge/include/cfx_graphstatedata.h" #include "xfa/fxfa/include/fxfa.h" #include "xfa/fxfa/parser/cxfa_contentlayoutitem.h" diff --git a/xfa/fxfa/parser/DEPS b/xfa/fxfa/parser/DEPS index 97ccb1faa6..1519ceaa93 100644 --- a/xfa/fxfa/parser/DEPS +++ b/xfa/fxfa/parser/DEPS @@ -1,3 +1,3 @@ include_rules = [ - '+core/fxcodec/include', + '+core/fxcodec', ] diff --git a/xfa/fxfa/parser/xfa_localemgr.cpp b/xfa/fxfa/parser/xfa_localemgr.cpp index 94a2f5a3f6..9b444defee 100644 --- a/xfa/fxfa/parser/xfa_localemgr.cpp +++ b/xfa/fxfa/parser/xfa_localemgr.cpp @@ -9,7 +9,7 @@ #include #include -#include "core/fxcodec/include/fx_codec.h" +#include "core/fxcodec/fx_codec.h" #include "core/fxcrt/include/fx_xml.h" #include "core/fxge/include/cfx_gemodule.h" #include "xfa/fxfa/parser/cxfa_document.h" -- cgit v1.2.3