diff options
author | Lei Zhang <thestig@chromium.org> | 2018-01-18 19:03:58 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-18 19:03:58 +0000 |
commit | 6e59fb5fda71eb527568a58d9c948b5f76c9bdc2 (patch) | |
tree | 82bb6ad56c0c5c256500ea8a1d355810846163bb /core | |
parent | 51344821bb8d1d3309bb1dd82972df26b75745e2 (diff) | |
download | pdfium-6e59fb5fda71eb527568a58d9c948b5f76c9bdc2.tar.xz |
Remove more unneeded includes and code from headers.
Change-Id: I0a07dbc9850bef2184ed35ff04b08385fc1bdd17
Reviewed-on: https://pdfium-review.googlesource.com/22891
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core')
22 files changed, 20 insertions, 15 deletions
diff --git a/core/fpdfapi/font/cfx_cttgsubtable.h b/core/fpdfapi/font/cfx_cttgsubtable.h index 8722bf665c..fc1caf5ef2 100644 --- a/core/fpdfapi/font/cfx_cttgsubtable.h +++ b/core/fpdfapi/font/cfx_cttgsubtable.h @@ -13,7 +13,6 @@ #include <set> #include <vector> -#include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" class CFX_CTTGSUBTable { diff --git a/core/fpdfapi/page/cpdf_image.cpp b/core/fpdfapi/page/cpdf_image.cpp index 5221fd73be..65ca78e08e 100644 --- a/core/fpdfapi/page/cpdf_image.cpp +++ b/core/fpdfapi/page/cpdf_image.cpp @@ -26,6 +26,7 @@ #include "core/fpdfapi/render/cpdf_pagerendercache.h" #include "core/fxcodec/codec/ccodec_jpegmodule.h" #include "core/fxcrt/fx_stream.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_dib.h" #include "third_party/base/numerics/safe_conversions.h" #include "third_party/base/ptr_util.h" diff --git a/core/fpdfapi/render/cpdf_devicebuffer.cpp b/core/fpdfapi/render/cpdf_devicebuffer.cpp index 90301b2e56..b96d00208e 100644 --- a/core/fpdfapi/render/cpdf_devicebuffer.cpp +++ b/core/fpdfapi/render/cpdf_devicebuffer.cpp @@ -11,6 +11,7 @@ #include "core/fpdfapi/render/cpdf_renderoptions.h" #include "core/fxge/cfx_defaultrenderdevice.h" #include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_dib.h" #include "third_party/base/ptr_util.h" diff --git a/core/fpdfapi/render/cpdf_dibsource.cpp b/core/fpdfapi/render/cpdf_dibsource.cpp index d8ddc767ba..c1b96073d9 100644 --- a/core/fpdfapi/render/cpdf_dibsource.cpp +++ b/core/fpdfapi/render/cpdf_dibsource.cpp @@ -30,6 +30,7 @@ #include "core/fxcodec/fx_codec.h" #include "core/fxcrt/cfx_fixedbufgrow.h" #include "core/fxcrt/fx_safe_types.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "third_party/base/ptr_util.h" namespace { diff --git a/core/fpdfapi/render/cpdf_dibsource.h b/core/fpdfapi/render/cpdf_dibsource.h index 0971eb3887..d3f65156c3 100644 --- a/core/fpdfapi/render/cpdf_dibsource.h +++ b/core/fpdfapi/render/cpdf_dibsource.h @@ -21,7 +21,7 @@ #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/cfx_defaultrenderdevice.h" -#include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/dib/cfx_dibsource.h" class CCodec_Jbig2Context; class CCodec_ScanlineDecoder; diff --git a/core/fpdfapi/render/cpdf_imagecacheentry.cpp b/core/fpdfapi/render/cpdf_imagecacheentry.cpp index 666839b0f2..f69bfdae68 100644 --- a/core/fpdfapi/render/cpdf_imagecacheentry.cpp +++ b/core/fpdfapi/render/cpdf_imagecacheentry.cpp @@ -17,6 +17,7 @@ #include "core/fpdfapi/render/cpdf_pagerendercache.h" #include "core/fpdfapi/render/cpdf_rendercontext.h" #include "core/fpdfapi/render/cpdf_renderstatus.h" +#include "core/fxge/dib/cfx_dibitmap.h" CPDF_ImageCacheEntry::CPDF_ImageCacheEntry(CPDF_Document* pDoc, const RetainPtr<CPDF_Image>& pImage) diff --git a/core/fpdfapi/render/cpdf_rendercontext.cpp b/core/fpdfapi/render/cpdf_rendercontext.cpp index ef6d9b3d4d..0656edda22 100644 --- a/core/fpdfapi/render/cpdf_rendercontext.cpp +++ b/core/fpdfapi/render/cpdf_rendercontext.cpp @@ -17,6 +17,7 @@ #include "core/fpdfapi/render/cpdf_renderstatus.h" #include "core/fpdfapi/render/cpdf_textrenderer.h" #include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_dib.h" CPDF_RenderContext::CPDF_RenderContext(CPDF_Page* pPage) diff --git a/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp b/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp index 82970e5e60..2d86024787 100644 --- a/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp +++ b/core/fpdfapi/render/cpdf_scaledrenderbuffer.cpp @@ -9,7 +9,7 @@ #include "core/fpdfapi/render/cpdf_rendercontext.h" #include "core/fpdfapi/render/cpdf_renderoptions.h" #include "core/fxge/cfx_defaultrenderdevice.h" -#include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "third_party/base/ptr_util.h" #define _FPDFAPI_IMAGESIZE_LIMIT_ (30 * 1024 * 1024) diff --git a/core/fpdfdoc/cpdf_variabletext.h b/core/fpdfdoc/cpdf_variabletext.h index a37aa871d5..a939dcb0e1 100644 --- a/core/fpdfdoc/cpdf_variabletext.h +++ b/core/fpdfdoc/cpdf_variabletext.h @@ -18,7 +18,6 @@ #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/fx_string.h" #include "core/fxcrt/fx_system.h" -#include "core/fxge/fx_font.h" class CPVT_Word; class CSection; diff --git a/core/fxge/android/cfx_androidfontinfo.h b/core/fxge/android/cfx_androidfontinfo.h index bf5fae59df..e49b1617de 100644 --- a/core/fxge/android/cfx_androidfontinfo.h +++ b/core/fxge/android/cfx_androidfontinfo.h @@ -10,7 +10,6 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/cfx_fontmapper.h" -#include "core/fxge/fx_font.h" #include "core/fxge/ifx_systemfontinfo.h" class CFPF_SkiaFontMgr; diff --git a/core/fxge/apple/fx_quartz_device.cpp b/core/fxge/apple/fx_quartz_device.cpp index 4ab6620485..709f201f8a 100644 --- a/core/fxge/apple/fx_quartz_device.cpp +++ b/core/fxge/apple/fx_quartz_device.cpp @@ -14,6 +14,7 @@ #include "core/fxge/cfx_graphstatedata.h" #include "core/fxge/cfx_pathdata.h" #include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/fx_freetype.h" #include "third_party/base/ptr_util.h" diff --git a/core/fxge/cfx_folderfontinfo.h b/core/fxge/cfx_folderfontinfo.h index 79faa01838..397b386066 100644 --- a/core/fxge/cfx_folderfontinfo.h +++ b/core/fxge/cfx_folderfontinfo.h @@ -13,7 +13,6 @@ #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/cfx_fontmapper.h" -#include "core/fxge/fx_font.h" #include "core/fxge/ifx_systemfontinfo.h" class CFX_FolderFontInfo : public IFX_SystemFontInfo { diff --git a/core/fxge/cfx_gemodule.h b/core/fxge/cfx_gemodule.h index 7849937f8f..f48d065561 100644 --- a/core/fxge/cfx_gemodule.h +++ b/core/fxge/cfx_gemodule.h @@ -9,8 +9,6 @@ #include <memory> -#include "core/fxge/fx_font.h" - class CFX_FontCache; class CFX_FontMgr; diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index 5b18b2293a..d8cb9a6952 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -12,11 +12,12 @@ #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/cfx_color.h" #include "core/fxge/fx_dib.h" -#include "core/fxge/fx_font.h" +class CFX_DIBitmap; class CFX_Font; class CFX_GraphStateData; class CFX_ImageRenderer; +class IFX_PauseIndicator; class IFX_RenderDeviceDriver; #define FXDC_DEVICE_CLASS 1 diff --git a/core/fxge/cfx_unicodeencoding.h b/core/fxge/cfx_unicodeencoding.h index 40562e7c4a..f8bcff391f 100644 --- a/core/fxge/cfx_unicodeencoding.h +++ b/core/fxge/cfx_unicodeencoding.h @@ -7,7 +7,7 @@ #ifndef CORE_FXGE_CFX_UNICODEENCODING_H_ #define CORE_FXGE_CFX_UNICODEENCODING_H_ -#include "core/fxge/fx_font.h" +#include <stdint.h> #ifdef PDF_ENABLE_XFA #define FXFM_ENC_TAG(a, b, c, d) \ diff --git a/core/fxge/cfx_unicodeencodingex.h b/core/fxge/cfx_unicodeencodingex.h index e62410a122..5632d9665d 100644 --- a/core/fxge/cfx_unicodeencodingex.h +++ b/core/fxge/cfx_unicodeencodingex.h @@ -14,7 +14,6 @@ #include "core/fxcrt/fx_system.h" #include "core/fxge/cfx_unicodeencoding.h" #include "core/fxge/fx_dib.h" -#include "core/fxge/fx_freetype.h" class CFX_UnicodeEncodingEx : public CFX_UnicodeEncoding { public: diff --git a/core/fxge/fx_ge_text.cpp b/core/fxge/fx_ge_text.cpp index a04e6d0e85..147e712e57 100644 --- a/core/fxge/fx_ge_text.cpp +++ b/core/fxge/fx_ge_text.cpp @@ -10,6 +10,7 @@ #include "core/fxcrt/fx_safe_types.h" #include "core/fxge/cfx_pathdata.h" +#include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" #include "core/fxge/ifx_renderdevicedriver.h" diff --git a/core/fxge/ifx_renderdevicedriver.cpp b/core/fxge/ifx_renderdevicedriver.cpp index 669aadf0d8..eae773d75c 100644 --- a/core/fxge/ifx_renderdevicedriver.cpp +++ b/core/fxge/ifx_renderdevicedriver.cpp @@ -8,7 +8,7 @@ #include "core/fxcrt/fx_coordinates.h" #include "core/fxge/cfx_pathdata.h" -#include "core/fxge/cfx_renderdevice.h" +#include "core/fxge/dib/cfx_dibitmap.h" IFX_RenderDeviceDriver::~IFX_RenderDeviceDriver() {} diff --git a/core/fxge/ifx_systemfontinfo.h b/core/fxge/ifx_systemfontinfo.h index 391baa2cdd..1ae097b9f9 100644 --- a/core/fxge/ifx_systemfontinfo.h +++ b/core/fxge/ifx_systemfontinfo.h @@ -10,7 +10,6 @@ #include <memory> #include "core/fxge/cfx_fontmapper.h" -#include "core/fxge/fx_font.h" const uint32_t kTableNAME = FXDWORD_GET_MSBFIRST("name"); const uint32_t kTableTTCF = FXDWORD_GET_MSBFIRST("ttcf"); diff --git a/core/fxge/skia/fx_skia_device.cpp b/core/fxge/skia/fx_skia_device.cpp index 6e27ea1775..ab8efff72c 100644 --- a/core/fxge/skia/fx_skia_device.cpp +++ b/core/fxge/skia/fx_skia_device.cpp @@ -1548,6 +1548,10 @@ void CFX_SkiaDeviceDriver::Flush() { m_pCache->Flush(); } +void CFX_SkiaDeviceDriver::PreMultiply() { + m_pBitmap->PreMultiply(); +} + bool CFX_SkiaDeviceDriver::DrawDeviceText(int nChars, const FXTEXT_CHARPOS* pCharPos, CFX_Font* pFont, diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index 4423081251..7dfdef4de8 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -150,7 +150,7 @@ class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { void Clear(uint32_t color); void Flush() override; SkPictureRecorder* GetRecorder() const { return m_pRecorder; } - void PreMultiply() { m_pBitmap->PreMultiply(); } + void PreMultiply(); static void PreMultiply(const RetainPtr<CFX_DIBitmap>& pDIBitmap); SkCanvas* SkiaCanvas() { return m_pCanvas; } void DebugVerifyBitmapIsPreMultiplied() const; diff --git a/core/fxge/win32/cfx_windowsdib.h b/core/fxge/win32/cfx_windowsdib.h index cc2305001e..7c2447ded2 100644 --- a/core/fxge/win32/cfx_windowsdib.h +++ b/core/fxge/win32/cfx_windowsdib.h @@ -11,7 +11,8 @@ #include <windows.h> #endif -#include "core/fxge/fx_dib.h" +#include "core/fxcrt/bytestring.h" +#include "core/fxge/dib/cfx_dibitmap.h" #define WINDIB_OPEN_MEMORY 0x1 #define WINDIB_OPEN_PATHNAME 0x2 |