From f8af565a78ee1910b8c98a5bdfb9ab6b88442317 Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Tue, 6 Mar 2018 18:56:33 +0000 Subject: Rename IFX classes in core/fxge to Iface This CL renames IFX classes in core/fxge to Iface. Change-Id: I137167ddd4ff1563d8002d9501222c27183408cc Reviewed-on: https://pdfium-review.googlesource.com/27990 Reviewed-by: Tom Sepez Commit-Queue: dsinclair --- core/fxge/agg/fx_agg_driver.h | 6 +- core/fxge/android/cfx_androidfontinfo.h | 6 +- core/fxge/apple/apple_int.h | 2 +- core/fxge/apple/fx_mac_imp.cpp | 6 +- core/fxge/cfx_folderfontinfo.h | 4 +- core/fxge/cfx_fontmapper.cpp | 4 +- core/fxge/cfx_fontmapper.h | 8 +-- core/fxge/cfx_fontmgr.cpp | 4 +- core/fxge/cfx_fontmgr.h | 4 +- core/fxge/cfx_renderdevice.cpp | 4 +- core/fxge/cfx_renderdevice.h | 8 +-- core/fxge/cfx_windowsrenderdevice.h | 4 +- core/fxge/dib/cfx_bitmapcomposer.h | 6 +- core/fxge/dib/cfx_bitmapstorer.h | 6 +- core/fxge/dib/cfx_imagestretcher.cpp | 2 +- core/fxge/dib/cfx_imagestretcher.h | 6 +- core/fxge/dib/cstretchengine.cpp | 4 +- core/fxge/dib/cstretchengine.h | 6 +- core/fxge/dib/ifx_scanlinecomposer.h | 26 -------- core/fxge/dib/scanlinecomposer_iface.h | 26 ++++++++ core/fxge/fx_ge_fontmap.cpp | 14 ++-- core/fxge/fx_ge_linux.cpp | 6 +- core/fxge/fx_ge_text.cpp | 2 +- core/fxge/ifx_renderdevicedriver.cpp | 99 --------------------------- core/fxge/ifx_renderdevicedriver.h | 115 -------------------------------- core/fxge/ifx_systemfontinfo.h | 49 -------------- core/fxge/renderdevicedriver_iface.cpp | 99 +++++++++++++++++++++++++++ core/fxge/renderdevicedriver_iface.h | 115 ++++++++++++++++++++++++++++++++ core/fxge/skia/fx_skia_device.h | 4 +- core/fxge/systemfontinfo_iface.h | 49 ++++++++++++++ core/fxge/win32/fx_win32_device.cpp | 16 ++--- core/fxge/win32/win32_int.h | 14 ++-- 32 files changed, 362 insertions(+), 362 deletions(-) delete mode 100644 core/fxge/dib/ifx_scanlinecomposer.h create mode 100644 core/fxge/dib/scanlinecomposer_iface.h delete mode 100644 core/fxge/ifx_renderdevicedriver.cpp delete mode 100644 core/fxge/ifx_renderdevicedriver.h delete mode 100644 core/fxge/ifx_systemfontinfo.h create mode 100644 core/fxge/renderdevicedriver_iface.cpp create mode 100644 core/fxge/renderdevicedriver_iface.h create mode 100644 core/fxge/systemfontinfo_iface.h (limited to 'core/fxge') diff --git a/core/fxge/agg/fx_agg_driver.h b/core/fxge/agg/fx_agg_driver.h index 3f4481c507..adea810a67 100644 --- a/core/fxge/agg/fx_agg_driver.h +++ b/core/fxge/agg/fx_agg_driver.h @@ -10,7 +10,7 @@ #include #include -#include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/renderdevicedriver_iface.h" #include "third_party/agg23/agg_clip_liang_barsky.h" #include "third_party/agg23/agg_path_storage.h" #include "third_party/agg23/agg_rasterizer_scanline_aa.h" @@ -30,7 +30,7 @@ class CAgg_PathData { agg::path_storage m_PathData; }; -class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { +class CFX_AggDeviceDriver : public RenderDeviceDriverIface { public: CFX_AggDeviceDriver(const RetainPtr& pBitmap, bool bRgbByteOrder, @@ -41,7 +41,7 @@ class CFX_AggDeviceDriver : public IFX_RenderDeviceDriver { void InitPlatform(); void DestroyPlatform(); - // IFX_RenderDeviceDriver + // RenderDeviceDriverIface int GetDeviceCaps(int caps_id) const override; void SaveState() override; void RestoreState(bool bKeepSaved) override; diff --git a/core/fxge/android/cfx_androidfontinfo.h b/core/fxge/android/cfx_androidfontinfo.h index e49b1617de..62ad7184fe 100644 --- a/core/fxge/android/cfx_androidfontinfo.h +++ b/core/fxge/android/cfx_androidfontinfo.h @@ -10,18 +10,18 @@ #include "core/fxcrt/fx_system.h" #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/cfx_fontmapper.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" class CFPF_SkiaFontMgr; -class CFX_AndroidFontInfo : public IFX_SystemFontInfo { +class CFX_AndroidFontInfo : public SystemFontInfoIface { public: CFX_AndroidFontInfo(); ~CFX_AndroidFontInfo() override; bool Init(CFPF_SkiaFontMgr* pFontMgr); - // IFX_SystemFontInfo: + // SystemFontInfoIface: bool EnumFontList(CFX_FontMapper* pMapper) override; void* MapFont(int weight, bool bItalic, diff --git a/core/fxge/apple/apple_int.h b/core/fxge/apple/apple_int.h index 82415ec07f..d57989180d 100644 --- a/core/fxge/apple/apple_int.h +++ b/core/fxge/apple/apple_int.h @@ -13,7 +13,7 @@ #include "core/fxge/cfx_pathdata.h" #include "core/fxge/cfx_renderdevice.h" #include "core/fxge/fx_dib.h" -#include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/renderdevicedriver_iface.h" #include diff --git a/core/fxge/apple/fx_mac_imp.cpp b/core/fxge/apple/fx_mac_imp.cpp index b212f1567c..076cb2288c 100644 --- a/core/fxge/apple/fx_mac_imp.cpp +++ b/core/fxge/apple/fx_mac_imp.cpp @@ -12,7 +12,7 @@ #include "core/fxge/cfx_folderfontinfo.h" #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/cfx_gemodule.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" #include "third_party/base/ptr_util.h" namespace { @@ -120,7 +120,7 @@ void* CFX_MacFontInfo::MapFont(int weight, } // namespace -std::unique_ptr IFX_SystemFontInfo::CreateDefault( +std::unique_ptr SystemFontInfoIface::CreateDefault( const char** pUnused) { auto pInfo = pdfium::MakeUnique(); pInfo->AddPath("~/Library/Fonts"); @@ -131,7 +131,7 @@ std::unique_ptr IFX_SystemFontInfo::CreateDefault( void CFX_GEModule::InitPlatform() { m_pPlatformData = new CApplePlatform; - m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); + m_pFontMgr->SetSystemFontInfo(SystemFontInfoIface::CreateDefault(nullptr)); } void CFX_GEModule::DestroyPlatform() { diff --git a/core/fxge/cfx_folderfontinfo.h b/core/fxge/cfx_folderfontinfo.h index 397b386066..1f9830143b 100644 --- a/core/fxge/cfx_folderfontinfo.h +++ b/core/fxge/cfx_folderfontinfo.h @@ -13,9 +13,9 @@ #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/cfx_fontmapper.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" -class CFX_FolderFontInfo : public IFX_SystemFontInfo { +class CFX_FolderFontInfo : public SystemFontInfoIface { public: CFX_FolderFontInfo(); ~CFX_FolderFontInfo() override; diff --git a/core/fxge/cfx_fontmapper.cpp b/core/fxge/cfx_fontmapper.cpp index 7dba8f68b1..b3e88c00fe 100644 --- a/core/fxge/cfx_fontmapper.cpp +++ b/core/fxge/cfx_fontmapper.cpp @@ -17,7 +17,7 @@ #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/cfx_substfont.h" #include "core/fxge/fx_font.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" #include "third_party/base/stl_util.h" namespace { @@ -287,7 +287,7 @@ CFX_FontMapper::~CFX_FontMapper() { } void CFX_FontMapper::SetSystemFontInfo( - std::unique_ptr pFontInfo) { + std::unique_ptr pFontInfo) { if (!pFontInfo) return; diff --git a/core/fxge/cfx_fontmapper.h b/core/fxge/cfx_fontmapper.h index ed8ab61445..13d906c2df 100644 --- a/core/fxge/cfx_fontmapper.h +++ b/core/fxge/cfx_fontmapper.h @@ -15,15 +15,15 @@ class CFX_FontMgr; class CFX_SubstFont; -class IFX_SystemFontInfo; +class SystemFontInfoIface; class CFX_FontMapper { public: explicit CFX_FontMapper(CFX_FontMgr* mgr); ~CFX_FontMapper(); - void SetSystemFontInfo(std::unique_ptr pFontInfo); - IFX_SystemFontInfo* GetSystemFontInfo() { return m_pFontInfo.get(); } + void SetSystemFontInfo(std::unique_ptr pFontInfo); + SystemFontInfoIface* GetSystemFontInfo() { return m_pFontInfo.get(); } void AddInstalledFont(const ByteString& name, int charset); void LoadInstalledFonts(); @@ -77,7 +77,7 @@ class CFX_FontMapper { FXFT_Face m_MMFaces[MM_FACE_COUNT]; ByteString m_LastFamily; std::vector m_FaceArray; - std::unique_ptr m_pFontInfo; + std::unique_ptr m_pFontInfo; FXFT_Face m_FoxitFaces[FOXIT_FACE_COUNT]; UnownedPtr const m_pFontMgr; }; diff --git a/core/fxge/cfx_fontmgr.cpp b/core/fxge/cfx_fontmgr.cpp index e2be93eab4..158b5d0cdb 100644 --- a/core/fxge/cfx_fontmgr.cpp +++ b/core/fxge/cfx_fontmgr.cpp @@ -14,7 +14,7 @@ #include "core/fxge/cttfontdesc.h" #include "core/fxge/fontdata/chromefontdata/chromefontdata.h" #include "core/fxge/fx_font.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" #include "third_party/base/ptr_util.h" namespace { @@ -99,7 +99,7 @@ void CFX_FontMgr::InitFTLibrary() { } void CFX_FontMgr::SetSystemFontInfo( - std::unique_ptr pFontInfo) { + std::unique_ptr pFontInfo) { m_pBuiltinMapper->SetSystemFontInfo(std::move(pFontInfo)); } diff --git a/core/fxge/cfx_fontmgr.h b/core/fxge/cfx_fontmgr.h index e53a4ca324..6ca0970bdc 100644 --- a/core/fxge/cfx_fontmgr.h +++ b/core/fxge/cfx_fontmgr.h @@ -15,7 +15,7 @@ class CFX_FontMapper; class CFX_SubstFont; class CTTFontDesc; -class IFX_SystemFontInfo; +class SystemFontInfoIface; class CFX_FontMgr { public: @@ -46,7 +46,7 @@ class CFX_FontMgr { FXFT_Face GetFileFace(const char* filename, int face_index); FXFT_Face GetFixedFace(const uint8_t* pData, uint32_t size, int face_index); void ReleaseFace(FXFT_Face face); - void SetSystemFontInfo(std::unique_ptr pFontInfo); + void SetSystemFontInfo(std::unique_ptr pFontInfo); FXFT_Face FindSubstFont(const ByteString& face_name, bool bTrueType, uint32_t flags, diff --git a/core/fxge/cfx_renderdevice.cpp b/core/fxge/cfx_renderdevice.cpp index af148eec01..6c7e896b01 100644 --- a/core/fxge/cfx_renderdevice.cpp +++ b/core/fxge/cfx_renderdevice.cpp @@ -20,7 +20,7 @@ #include "core/fxge/cfx_graphstatedata.h" #include "core/fxge/cfx_pathdata.h" #include "core/fxge/dib/cfx_imagerenderer.h" -#include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/renderdevicedriver_iface.h" #if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ #include "third_party/skia/include/core/SkTypes.h" @@ -391,7 +391,7 @@ void CFX_RenderDevice::Flush(bool release) { #endif void CFX_RenderDevice::SetDeviceDriver( - std::unique_ptr pDriver) { + std::unique_ptr pDriver) { m_pDeviceDriver = std::move(pDriver); InitDeviceInfo(); } diff --git a/core/fxge/cfx_renderdevice.h b/core/fxge/cfx_renderdevice.h index 925ec26108..0eafe8c018 100644 --- a/core/fxge/cfx_renderdevice.h +++ b/core/fxge/cfx_renderdevice.h @@ -18,7 +18,7 @@ class CFX_Font; class CFX_GraphStateData; class CFX_ImageRenderer; class PauseIndicatorIface; -class IFX_RenderDeviceDriver; +class RenderDeviceDriverIface; #define FXDC_DEVICE_CLASS 1 #define FXDC_PIXEL_WIDTH 2 @@ -100,8 +100,8 @@ class CFX_RenderDevice { virtual ~CFX_RenderDevice(); // Take ownership of |pDriver|. - void SetDeviceDriver(std::unique_ptr pDriver); - IFX_RenderDeviceDriver* GetDeviceDriver() const { + void SetDeviceDriver(std::unique_ptr pDriver); + RenderDeviceDriverIface* GetDeviceDriver() const { return m_pDeviceDriver.get(); } @@ -299,7 +299,7 @@ class CFX_RenderDevice { int m_RenderCaps; int m_DeviceClass; FX_RECT m_ClipBox; - std::unique_ptr m_pDeviceDriver; + std::unique_ptr m_pDeviceDriver; }; #endif // CORE_FXGE_CFX_RENDERDEVICE_H_ diff --git a/core/fxge/cfx_windowsrenderdevice.h b/core/fxge/cfx_windowsrenderdevice.h index f1e0cbdb7a..c6e6686fab 100644 --- a/core/fxge/cfx_windowsrenderdevice.h +++ b/core/fxge/cfx_windowsrenderdevice.h @@ -21,7 +21,7 @@ enum WindowsPrintMode { kModePostScript3 = 3, }; -class IFX_RenderDeviceDriver; +class RenderDeviceDriverIface; #if defined(PDFIUM_PRINT_TEXT_WITH_GDI) typedef void (*PDFiumEnsureTypefaceCharactersAccessible)(const LOGFONT* font, @@ -36,7 +36,7 @@ extern int g_pdfium_print_mode; class CFX_WindowsRenderDevice : public CFX_RenderDevice { public: - static IFX_RenderDeviceDriver* CreateDriver(HDC hDC); + static RenderDeviceDriverIface* CreateDriver(HDC hDC); explicit CFX_WindowsRenderDevice(HDC hDC); ~CFX_WindowsRenderDevice() override; diff --git a/core/fxge/dib/cfx_bitmapcomposer.h b/core/fxge/dib/cfx_bitmapcomposer.h index 98c1f77847..f1bf0e9f32 100644 --- a/core/fxge/dib/cfx_bitmapcomposer.h +++ b/core/fxge/dib/cfx_bitmapcomposer.h @@ -13,12 +13,12 @@ #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/unowned_ptr.h" #include "core/fxge/dib/cfx_scanlinecompositor.h" -#include "core/fxge/dib/ifx_scanlinecomposer.h" +#include "core/fxge/dib/scanlinecomposer_iface.h" class CFX_ClipRgn; class CFX_DIBitmap; -class CFX_BitmapComposer : public IFX_ScanlineComposer { +class CFX_BitmapComposer : public ScanlineComposerIface { public: CFX_BitmapComposer(); ~CFX_BitmapComposer() override; @@ -35,7 +35,7 @@ class CFX_BitmapComposer : public IFX_ScanlineComposer { int alpha_flag, int blend_type); - // IFX_ScanlineComposer + // ScanlineComposerIface bool SetInfo(int width, int height, FXDIB_Format src_format, diff --git a/core/fxge/dib/cfx_bitmapstorer.h b/core/fxge/dib/cfx_bitmapstorer.h index 3d3416daa1..7d3482fc3f 100644 --- a/core/fxge/dib/cfx_bitmapstorer.h +++ b/core/fxge/dib/cfx_bitmapstorer.h @@ -13,15 +13,15 @@ #include "core/fxcrt/fx_coordinates.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxge/dib/cfx_dibitmap.h" -#include "core/fxge/dib/ifx_scanlinecomposer.h" +#include "core/fxge/dib/scanlinecomposer_iface.h" #include "third_party/base/stl_util.h" -class CFX_BitmapStorer : public IFX_ScanlineComposer { +class CFX_BitmapStorer : public ScanlineComposerIface { public: CFX_BitmapStorer(); ~CFX_BitmapStorer() override; - // IFX_ScanlineComposer + // ScanlineComposerIface void ComposeScanline(int line, const uint8_t* scanline, const uint8_t* scan_extra_alpha) override; diff --git a/core/fxge/dib/cfx_imagestretcher.cpp b/core/fxge/dib/cfx_imagestretcher.cpp index af93b266c7..9d8e290b43 100644 --- a/core/fxge/dib/cfx_imagestretcher.cpp +++ b/core/fxge/dib/cfx_imagestretcher.cpp @@ -42,7 +42,7 @@ std::tuple CmykDecode(const uint32_t cmyk) { } // namespace -CFX_ImageStretcher::CFX_ImageStretcher(IFX_ScanlineComposer* pDest, +CFX_ImageStretcher::CFX_ImageStretcher(ScanlineComposerIface* pDest, const RetainPtr& pSource, int dest_width, int dest_height, diff --git a/core/fxge/dib/cfx_imagestretcher.h b/core/fxge/dib/cfx_imagestretcher.h index e2ed4e990b..113372571b 100644 --- a/core/fxge/dib/cfx_imagestretcher.h +++ b/core/fxge/dib/cfx_imagestretcher.h @@ -13,7 +13,7 @@ #include "core/fxcrt/fx_memory.h" #include "core/fxcrt/retain_ptr.h" #include "core/fxcrt/unowned_ptr.h" -#include "core/fxge/dib/ifx_scanlinecomposer.h" +#include "core/fxge/dib/scanlinecomposer_iface.h" #include "core/fxge/fx_dib.h" class CFX_DIBSource; @@ -21,7 +21,7 @@ class PauseIndicatorIface; class CFX_ImageStretcher { public: - CFX_ImageStretcher(IFX_ScanlineComposer* pDest, + CFX_ImageStretcher(ScanlineComposerIface* pDest, const RetainPtr& pSource, int dest_width, int dest_height, @@ -40,7 +40,7 @@ class CFX_ImageStretcher { bool ContinueQuickStretch(PauseIndicatorIface* pPause); bool ContinueStretch(PauseIndicatorIface* pPause); - UnownedPtr const m_pDest; + UnownedPtr const m_pDest; RetainPtr m_pSource; std::unique_ptr m_pStretchEngine; std::unique_ptr m_pScanline; diff --git a/core/fxge/dib/cstretchengine.cpp b/core/fxge/dib/cstretchengine.cpp index cb7ffa0166..2915202daf 100644 --- a/core/fxge/dib/cstretchengine.cpp +++ b/core/fxge/dib/cstretchengine.cpp @@ -12,7 +12,7 @@ #include "core/fxcrt/pauseindicator_iface.h" #include "core/fxge/dib/cfx_dibitmap.h" #include "core/fxge/dib/cfx_dibsource.h" -#include "core/fxge/dib/ifx_scanlinecomposer.h" +#include "core/fxge/dib/scanlinecomposer_iface.h" #include "core/fxge/fx_dib.h" namespace { @@ -217,7 +217,7 @@ int* CStretchEngine::CWeightTable::GetValueFromPixelWeight(PixelWeight* pWeight, return idx < GetPixelWeightSize() ? &pWeight->m_Weights[idx] : nullptr; } -CStretchEngine::CStretchEngine(IFX_ScanlineComposer* pDestBitmap, +CStretchEngine::CStretchEngine(ScanlineComposerIface* pDestBitmap, FXDIB_Format dest_format, int dest_width, int dest_height, diff --git a/core/fxge/dib/cstretchengine.h b/core/fxge/dib/cstretchengine.h index 6f0d4dc54d..91530cc01f 100644 --- a/core/fxge/dib/cstretchengine.h +++ b/core/fxge/dib/cstretchengine.h @@ -15,11 +15,11 @@ #include "core/fxge/fx_dib.h" class PauseIndicatorIface; -class IFX_ScanlineComposer; +class ScanlineComposerIface; class CStretchEngine { public: - CStretchEngine(IFX_ScanlineComposer* pDestBitmap, + CStretchEngine(ScanlineComposerIface* pDestBitmap, FXDIB_Format dest_format, int dest_width, int dest_height, @@ -61,7 +61,7 @@ class CStretchEngine { int m_DestBpp; int m_SrcBpp; int m_bHasAlpha; - UnownedPtr m_pDestBitmap; + UnownedPtr m_pDestBitmap; int m_DestWidth; int m_DestHeight; FX_RECT m_DestClip; diff --git a/core/fxge/dib/ifx_scanlinecomposer.h b/core/fxge/dib/ifx_scanlinecomposer.h deleted file mode 100644 index 7b070c02ff..0000000000 --- a/core/fxge/dib/ifx_scanlinecomposer.h +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright 2017 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_FXGE_DIB_IFX_SCANLINECOMPOSER_H_ -#define CORE_FXGE_DIB_IFX_SCANLINECOMPOSER_H_ - -#include "core/fxge/fx_dib.h" - -class IFX_ScanlineComposer { - public: - virtual ~IFX_ScanlineComposer() {} - - virtual void ComposeScanline(int line, - const uint8_t* scanline, - const uint8_t* scan_extra_alpha) = 0; - - virtual bool SetInfo(int width, - int height, - FXDIB_Format src_format, - uint32_t* pSrcPalette) = 0; -}; - -#endif // CORE_FXGE_DIB_IFX_SCANLINECOMPOSER_H_ diff --git a/core/fxge/dib/scanlinecomposer_iface.h b/core/fxge/dib/scanlinecomposer_iface.h new file mode 100644 index 0000000000..2a8fbbccdf --- /dev/null +++ b/core/fxge/dib/scanlinecomposer_iface.h @@ -0,0 +1,26 @@ +// Copyright 2017 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_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_ +#define CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_ + +#include "core/fxge/fx_dib.h" + +class ScanlineComposerIface { + public: + virtual ~ScanlineComposerIface() {} + + virtual void ComposeScanline(int line, + const uint8_t* scanline, + const uint8_t* scan_extra_alpha) = 0; + + virtual bool SetInfo(int width, + int height, + FXDIB_Format src_format, + uint32_t* pSrcPalette) = 0; +}; + +#endif // CORE_FXGE_DIB_SCANLINECOMPOSER_IFACE_H_ diff --git a/core/fxge/fx_ge_fontmap.cpp b/core/fxge/fx_ge_fontmap.cpp index 6e3d8abea3..58b00f5ec9 100644 --- a/core/fxge/fx_ge_fontmap.cpp +++ b/core/fxge/fx_ge_fontmap.cpp @@ -7,7 +7,7 @@ #include #include "core/fxge/cfx_fontmapper.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" static ByteString GetStringFromTable(const uint8_t* string_ptr, uint32_t string_ptr_length, @@ -52,15 +52,15 @@ ByteString GetNameFromTT(const uint8_t* name_table, return ByteString(); } #ifdef PDF_ENABLE_XFA -void* IFX_SystemFontInfo::MapFontByUnicode(uint32_t dwUnicode, - int weight, - bool bItalic, - int pitch_family) { +void* SystemFontInfoIface::MapFontByUnicode(uint32_t dwUnicode, + int weight, + bool bItalic, + int pitch_family) { return nullptr; } #endif // PDF_ENABLE_XFA -int IFX_SystemFontInfo::GetFaceIndex(void* hFont) { +int SystemFontInfoIface::GetFaceIndex(void* hFont) { return 0; } @@ -73,7 +73,7 @@ void _FTStreamClose(FXFT_Stream stream); }; #if _FX_OS_ == _FX_OS_ANDROID_ -std::unique_ptr IFX_SystemFontInfo::CreateDefault( +std::unique_ptr SystemFontInfoIface::CreateDefault( const char** pUnused) { return nullptr; } diff --git a/core/fxge/fx_ge_linux.cpp b/core/fxge/fx_ge_linux.cpp index d5069f332a..d2da781881 100644 --- a/core/fxge/fx_ge_linux.cpp +++ b/core/fxge/fx_ge_linux.cpp @@ -11,7 +11,7 @@ #include "core/fxge/cfx_folderfontinfo.h" #include "core/fxge/cfx_fontmgr.h" #include "core/fxge/cfx_gemodule.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" #include "third_party/base/ptr_util.h" #if _FX_PLATFORM_ == _FX_PLATFORM_LINUX_ @@ -142,7 +142,7 @@ bool CFX_LinuxFontInfo::ParseFontCfg(const char** pUserPaths) { } // namespace -std::unique_ptr IFX_SystemFontInfo::CreateDefault( +std::unique_ptr SystemFontInfoIface::CreateDefault( const char** pUserPaths) { auto pInfo = pdfium::MakeUnique(); if (!pInfo->ParseFontCfg(pUserPaths)) { @@ -156,7 +156,7 @@ std::unique_ptr IFX_SystemFontInfo::CreateDefault( void CFX_GEModule::InitPlatform() { m_pFontMgr->SetSystemFontInfo( - IFX_SystemFontInfo::CreateDefault(m_pUserFontPaths)); + SystemFontInfoIface::CreateDefault(m_pUserFontPaths)); } void CFX_GEModule::DestroyPlatform() {} diff --git a/core/fxge/fx_ge_text.cpp b/core/fxge/fx_ge_text.cpp index 147e712e57..3739e11393 100644 --- a/core/fxge/fx_ge_text.cpp +++ b/core/fxge/fx_ge_text.cpp @@ -12,7 +12,7 @@ #include "core/fxge/cfx_pathdata.h" #include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" -#include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/renderdevicedriver_iface.h" namespace { diff --git a/core/fxge/ifx_renderdevicedriver.cpp b/core/fxge/ifx_renderdevicedriver.cpp deleted file mode 100644 index ff8d8fde8d..0000000000 --- a/core/fxge/ifx_renderdevicedriver.cpp +++ /dev/null @@ -1,99 +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 - -#include "core/fxge/ifx_renderdevicedriver.h" - -#include "core/fxcrt/fx_coordinates.h" -#include "core/fxge/cfx_pathdata.h" -#include "core/fxge/dib/cfx_dibitmap.h" - -IFX_RenderDeviceDriver::~IFX_RenderDeviceDriver() {} - -CFX_Matrix IFX_RenderDeviceDriver::GetCTM() const { - return CFX_Matrix(); -} - -bool IFX_RenderDeviceDriver::StartRendering() { - return true; -} - -void IFX_RenderDeviceDriver::EndRendering() {} - -bool IFX_RenderDeviceDriver::SetClip_PathStroke( - const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - const CFX_GraphStateData* pGraphState) { - return false; -} - -bool IFX_RenderDeviceDriver::SetPixel(int x, int y, uint32_t color) { - return false; -} - -bool IFX_RenderDeviceDriver::FillRectWithBlend(const FX_RECT* pRect, - uint32_t fill_color, - int blend_type) { - return false; -} - -bool IFX_RenderDeviceDriver::DrawCosmeticLine(const CFX_PointF& ptMoveTo, - const CFX_PointF& ptLineTo, - uint32_t color, - int blend_type) { - return false; -} - -bool IFX_RenderDeviceDriver::GetDIBits(const RetainPtr& pBitmap, - int left, - int top) { - return false; -} - -RetainPtr IFX_RenderDeviceDriver::GetBackDrop() { - return RetainPtr(); -} - -bool IFX_RenderDeviceDriver::ContinueDIBits(CFX_ImageRenderer* handle, - PauseIndicatorIface* pPause) { - return false; -} - -bool IFX_RenderDeviceDriver::DrawDeviceText(int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - const CFX_Matrix* pObject2Device, - float font_size, - uint32_t color) { - return false; -} - -int IFX_RenderDeviceDriver::GetDriverType() const { - return 0; -} - -void IFX_RenderDeviceDriver::ClearDriver() {} - -bool IFX_RenderDeviceDriver::DrawShading(const CPDF_ShadingPattern* pPattern, - const CFX_Matrix* pMatrix, - const FX_RECT& clip_rect, - int alpha, - bool bAlphaMode) { - return false; -} - -bool IFX_RenderDeviceDriver::SetBitsWithMask( - const RetainPtr& pBitmap, - const RetainPtr& pMask, - int left, - int top, - int bitmap_alpha, - int blend_type) { - return false; -} - -#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ -void IFX_RenderDeviceDriver::Flush() {} -#endif diff --git a/core/fxge/ifx_renderdevicedriver.h b/core/fxge/ifx_renderdevicedriver.h deleted file mode 100644 index 90c94da506..0000000000 --- a/core/fxge/ifx_renderdevicedriver.h +++ /dev/null @@ -1,115 +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_FXGE_IFX_RENDERDEVICEDRIVER_H_ -#define CORE_FXGE_IFX_RENDERDEVICEDRIVER_H_ - -#include - -#include "core/fxcrt/fx_coordinates.h" -#include "core/fxcrt/fx_system.h" -#include "core/fxcrt/retain_ptr.h" - -class CFX_DIBitmap; -class CFX_DIBSource; -class CFX_Font; -class CFX_GraphStateData; -class CFX_ImageRenderer; -class CFX_Matrix; -class CFX_PathData; -class CPDF_ShadingPattern; -class FXTEXT_CHARPOS; -class PauseIndicatorIface; -struct FX_RECT; - -class IFX_RenderDeviceDriver { - public: - virtual ~IFX_RenderDeviceDriver(); - - virtual int GetDeviceCaps(int caps_id) const = 0; - virtual CFX_Matrix GetCTM() const; - - virtual bool StartRendering(); - virtual void EndRendering(); - virtual void SaveState() = 0; - virtual void RestoreState(bool bKeepSaved) = 0; - - virtual bool SetClip_PathFill(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - int fill_mode) = 0; - virtual bool SetClip_PathStroke(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - const CFX_GraphStateData* pGraphState); - virtual bool DrawPath(const CFX_PathData* pPathData, - const CFX_Matrix* pObject2Device, - const CFX_GraphStateData* pGraphState, - uint32_t fill_color, - uint32_t stroke_color, - int fill_mode, - int blend_type) = 0; - virtual bool SetPixel(int x, int y, uint32_t color); - virtual bool FillRectWithBlend(const FX_RECT* pRect, - uint32_t fill_color, - int blend_type); - virtual bool DrawCosmeticLine(const CFX_PointF& ptMoveTo, - const CFX_PointF& ptLineTo, - uint32_t color, - int blend_type); - - virtual bool GetClipBox(FX_RECT* pRect) = 0; - virtual bool GetDIBits(const RetainPtr& pBitmap, - int left, - int top); - virtual RetainPtr GetBackDrop(); - virtual bool SetDIBits(const RetainPtr& pBitmap, - uint32_t color, - const FX_RECT* pSrcRect, - int dest_left, - int dest_top, - int blend_type) = 0; - virtual bool StretchDIBits(const RetainPtr& pBitmap, - uint32_t color, - int dest_left, - int dest_top, - int dest_width, - int dest_height, - const FX_RECT* pClipRect, - uint32_t flags, - int blend_type) = 0; - virtual bool StartDIBits(const RetainPtr& pBitmap, - int bitmap_alpha, - uint32_t color, - const CFX_Matrix* pMatrix, - uint32_t flags, - std::unique_ptr* handle, - int blend_type) = 0; - virtual bool ContinueDIBits(CFX_ImageRenderer* handle, - PauseIndicatorIface* pPause); - virtual bool DrawDeviceText(int nChars, - const FXTEXT_CHARPOS* pCharPos, - CFX_Font* pFont, - const CFX_Matrix* pObject2Device, - float font_size, - uint32_t color); - virtual int GetDriverType() const; - virtual void ClearDriver(); - virtual bool DrawShading(const CPDF_ShadingPattern* pPattern, - const CFX_Matrix* pMatrix, - const FX_RECT& clip_rect, - int alpha, - bool bAlphaMode); - virtual bool SetBitsWithMask(const RetainPtr& pBitmap, - const RetainPtr& pMask, - int left, - int top, - int bitmap_alpha, - int blend_type); -#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ - virtual void Flush(); -#endif -}; - -#endif // CORE_FXGE_IFX_RENDERDEVICEDRIVER_H_ diff --git a/core/fxge/ifx_systemfontinfo.h b/core/fxge/ifx_systemfontinfo.h deleted file mode 100644 index 1ae097b9f9..0000000000 --- a/core/fxge/ifx_systemfontinfo.h +++ /dev/null @@ -1,49 +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_FXGE_IFX_SYSTEMFONTINFO_H_ -#define CORE_FXGE_IFX_SYSTEMFONTINFO_H_ - -#include - -#include "core/fxge/cfx_fontmapper.h" - -const uint32_t kTableNAME = FXDWORD_GET_MSBFIRST("name"); -const uint32_t kTableTTCF = FXDWORD_GET_MSBFIRST("ttcf"); - -class IFX_SystemFontInfo { - public: - static std::unique_ptr CreateDefault( - const char** pUserPaths); - - virtual ~IFX_SystemFontInfo() = default; - - virtual bool EnumFontList(CFX_FontMapper* pMapper) = 0; - virtual void* MapFont(int weight, - bool bItalic, - int charset, - int pitch_family, - const char* face) = 0; - -#ifdef PDF_ENABLE_XFA - virtual void* MapFontByUnicode(uint32_t dwUnicode, - int weight, - bool bItalic, - int pitch_family); -#endif // PDF_ENABLE_XFA - - virtual void* GetFont(const char* face) = 0; - virtual uint32_t GetFontData(void* hFont, - uint32_t table, - uint8_t* buffer, - uint32_t size) = 0; - virtual bool GetFaceName(void* hFont, ByteString* name) = 0; - virtual bool GetFontCharset(void* hFont, int* charset) = 0; - virtual int GetFaceIndex(void* hFont); - virtual void DeleteFont(void* hFont) = 0; -}; - -#endif // CORE_FXGE_IFX_SYSTEMFONTINFO_H_ diff --git a/core/fxge/renderdevicedriver_iface.cpp b/core/fxge/renderdevicedriver_iface.cpp new file mode 100644 index 0000000000..d1cd65d4e6 --- /dev/null +++ b/core/fxge/renderdevicedriver_iface.cpp @@ -0,0 +1,99 @@ +// 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 + +#include "core/fxge/renderdevicedriver_iface.h" + +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxge/cfx_pathdata.h" +#include "core/fxge/dib/cfx_dibitmap.h" + +RenderDeviceDriverIface::~RenderDeviceDriverIface() {} + +CFX_Matrix RenderDeviceDriverIface::GetCTM() const { + return CFX_Matrix(); +} + +bool RenderDeviceDriverIface::StartRendering() { + return true; +} + +void RenderDeviceDriverIface::EndRendering() {} + +bool RenderDeviceDriverIface::SetClip_PathStroke( + const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + const CFX_GraphStateData* pGraphState) { + return false; +} + +bool RenderDeviceDriverIface::SetPixel(int x, int y, uint32_t color) { + return false; +} + +bool RenderDeviceDriverIface::FillRectWithBlend(const FX_RECT* pRect, + uint32_t fill_color, + int blend_type) { + return false; +} + +bool RenderDeviceDriverIface::DrawCosmeticLine(const CFX_PointF& ptMoveTo, + const CFX_PointF& ptLineTo, + uint32_t color, + int blend_type) { + return false; +} + +bool RenderDeviceDriverIface::GetDIBits(const RetainPtr& pBitmap, + int left, + int top) { + return false; +} + +RetainPtr RenderDeviceDriverIface::GetBackDrop() { + return RetainPtr(); +} + +bool RenderDeviceDriverIface::ContinueDIBits(CFX_ImageRenderer* handle, + PauseIndicatorIface* pPause) { + return false; +} + +bool RenderDeviceDriverIface::DrawDeviceText(int nChars, + const FXTEXT_CHARPOS* pCharPos, + CFX_Font* pFont, + const CFX_Matrix* pObject2Device, + float font_size, + uint32_t color) { + return false; +} + +int RenderDeviceDriverIface::GetDriverType() const { + return 0; +} + +void RenderDeviceDriverIface::ClearDriver() {} + +bool RenderDeviceDriverIface::DrawShading(const CPDF_ShadingPattern* pPattern, + const CFX_Matrix* pMatrix, + const FX_RECT& clip_rect, + int alpha, + bool bAlphaMode) { + return false; +} + +bool RenderDeviceDriverIface::SetBitsWithMask( + const RetainPtr& pBitmap, + const RetainPtr& pMask, + int left, + int top, + int bitmap_alpha, + int blend_type) { + return false; +} + +#if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ +void RenderDeviceDriverIface::Flush() {} +#endif diff --git a/core/fxge/renderdevicedriver_iface.h b/core/fxge/renderdevicedriver_iface.h new file mode 100644 index 0000000000..7dd7a104f3 --- /dev/null +++ b/core/fxge/renderdevicedriver_iface.h @@ -0,0 +1,115 @@ +// 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_FXGE_RENDERDEVICEDRIVER_IFACE_H_ +#define CORE_FXGE_RENDERDEVICEDRIVER_IFACE_H_ + +#include + +#include "core/fxcrt/fx_coordinates.h" +#include "core/fxcrt/fx_system.h" +#include "core/fxcrt/retain_ptr.h" + +class CFX_DIBitmap; +class CFX_DIBSource; +class CFX_Font; +class CFX_GraphStateData; +class CFX_ImageRenderer; +class CFX_Matrix; +class CFX_PathData; +class CPDF_ShadingPattern; +class FXTEXT_CHARPOS; +class PauseIndicatorIface; +struct FX_RECT; + +class RenderDeviceDriverIface { + public: + virtual ~RenderDeviceDriverIface(); + + virtual int GetDeviceCaps(int caps_id) const = 0; + virtual CFX_Matrix GetCTM() const; + + virtual bool StartRendering(); + virtual void EndRendering(); + virtual void SaveState() = 0; + virtual void RestoreState(bool bKeepSaved) = 0; + + virtual bool SetClip_PathFill(const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + int fill_mode) = 0; + virtual bool SetClip_PathStroke(const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + const CFX_GraphStateData* pGraphState); + virtual bool DrawPath(const CFX_PathData* pPathData, + const CFX_Matrix* pObject2Device, + const CFX_GraphStateData* pGraphState, + uint32_t fill_color, + uint32_t stroke_color, + int fill_mode, + int blend_type) = 0; + virtual bool SetPixel(int x, int y, uint32_t color); + virtual bool FillRectWithBlend(const FX_RECT* pRect, + uint32_t fill_color, + int blend_type); + virtual bool DrawCosmeticLine(const CFX_PointF& ptMoveTo, + const CFX_PointF& ptLineTo, + uint32_t color, + int blend_type); + + virtual bool GetClipBox(FX_RECT* pRect) = 0; + virtual bool GetDIBits(const RetainPtr& pBitmap, + int left, + int top); + virtual RetainPtr GetBackDrop(); + virtual bool SetDIBits(const RetainPtr& pBitmap, + uint32_t color, + const FX_RECT* pSrcRect, + int dest_left, + int dest_top, + int blend_type) = 0; + virtual bool StretchDIBits(const RetainPtr& pBitmap, + uint32_t color, + int dest_left, + int dest_top, + int dest_width, + int dest_height, + const FX_RECT* pClipRect, + uint32_t flags, + int blend_type) = 0; + virtual bool StartDIBits(const RetainPtr& pBitmap, + int bitmap_alpha, + uint32_t color, + const CFX_Matrix* pMatrix, + uint32_t flags, + std::unique_ptr* handle, + int blend_type) = 0; + virtual bool ContinueDIBits(CFX_ImageRenderer* handle, + PauseIndicatorIface* pPause); + virtual bool DrawDeviceText(int nChars, + const FXTEXT_CHARPOS* pCharPos, + CFX_Font* pFont, + const CFX_Matrix* pObject2Device, + float font_size, + uint32_t color); + virtual int GetDriverType() const; + virtual void ClearDriver(); + virtual bool DrawShading(const CPDF_ShadingPattern* pPattern, + const CFX_Matrix* pMatrix, + const FX_RECT& clip_rect, + int alpha, + bool bAlphaMode); + virtual bool SetBitsWithMask(const RetainPtr& pBitmap, + const RetainPtr& pMask, + int left, + int top, + int bitmap_alpha, + int blend_type); +#if defined _SKIA_SUPPORT_ || defined _SKIA_SUPPORT_PATHS_ + virtual void Flush(); +#endif +}; + +#endif // CORE_FXGE_RENDERDEVICEDRIVER_IFACE_H_ diff --git a/core/fxge/skia/fx_skia_device.h b/core/fxge/skia/fx_skia_device.h index 4e60191f74..e545f9cd47 100644 --- a/core/fxge/skia/fx_skia_device.h +++ b/core/fxge/skia/fx_skia_device.h @@ -11,7 +11,7 @@ #include #include "core/fxge/cfx_pathdata.h" -#include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/renderdevicedriver_iface.h" class FXTEXT_CHARPOS; class SkCanvas; @@ -22,7 +22,7 @@ class SkPictureRecorder; class SkiaState; struct SkIRect; -class CFX_SkiaDeviceDriver : public IFX_RenderDeviceDriver { +class CFX_SkiaDeviceDriver : public RenderDeviceDriverIface { public: CFX_SkiaDeviceDriver(const RetainPtr& pBitmap, bool bRgbByteOrder, diff --git a/core/fxge/systemfontinfo_iface.h b/core/fxge/systemfontinfo_iface.h new file mode 100644 index 0000000000..bfd1538fc5 --- /dev/null +++ b/core/fxge/systemfontinfo_iface.h @@ -0,0 +1,49 @@ +// 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_FXGE_SYSTEMFONTINFO_IFACE_H_ +#define CORE_FXGE_SYSTEMFONTINFO_IFACE_H_ + +#include + +#include "core/fxge/cfx_fontmapper.h" + +const uint32_t kTableNAME = FXDWORD_GET_MSBFIRST("name"); +const uint32_t kTableTTCF = FXDWORD_GET_MSBFIRST("ttcf"); + +class SystemFontInfoIface { + public: + static std::unique_ptr CreateDefault( + const char** pUserPaths); + + virtual ~SystemFontInfoIface() = default; + + virtual bool EnumFontList(CFX_FontMapper* pMapper) = 0; + virtual void* MapFont(int weight, + bool bItalic, + int charset, + int pitch_family, + const char* face) = 0; + +#ifdef PDF_ENABLE_XFA + virtual void* MapFontByUnicode(uint32_t dwUnicode, + int weight, + bool bItalic, + int pitch_family); +#endif // PDF_ENABLE_XFA + + virtual void* GetFont(const char* face) = 0; + virtual uint32_t GetFontData(void* hFont, + uint32_t table, + uint8_t* buffer, + uint32_t size) = 0; + virtual bool GetFaceName(void* hFont, ByteString* name) = 0; + virtual bool GetFontCharset(void* hFont, int* charset) = 0; + virtual int GetFaceIndex(void* hFont); + virtual void DeleteFont(void* hFont) = 0; +}; + +#endif // CORE_FXGE_SYSTEMFONTINFO_IFACE_H_ diff --git a/core/fxge/win32/fx_win32_device.cpp b/core/fxge/win32/fx_win32_device.cpp index 41dc22060b..e20c765535 100644 --- a/core/fxge/win32/fx_win32_device.cpp +++ b/core/fxge/win32/fx_win32_device.cpp @@ -23,7 +23,7 @@ #include "core/fxge/dib/cstretchengine.h" #include "core/fxge/fx_font.h" #include "core/fxge/fx_freetype.h" -#include "core/fxge/ifx_systemfontinfo.h" +#include "core/fxge/systemfontinfo_iface.h" #include "core/fxge/win32/cfx_windowsdib.h" #include "core/fxge/win32/dwrite_int.h" #include "core/fxge/win32/win32_int.h" @@ -326,12 +326,12 @@ class CFX_Win32FallbackFontInfo final : public CFX_FolderFontInfo { const char* family) override; }; -class CFX_Win32FontInfo final : public IFX_SystemFontInfo { +class CFX_Win32FontInfo final : public SystemFontInfoIface { public: CFX_Win32FontInfo(); ~CFX_Win32FontInfo() override; - // IFX_SystemFontInfo + // SystemFontInfoIface bool EnumFontList(CFX_FontMapper* pMapper) override; void* MapFont(int weight, bool bItalic, @@ -679,10 +679,10 @@ bool CFX_Win32FontInfo::GetFontCharset(void* hFont, int* charset) { int g_pdfium_print_mode = WindowsPrintMode::kModeEmf; -std::unique_ptr IFX_SystemFontInfo::CreateDefault( +std::unique_ptr SystemFontInfoIface::CreateDefault( const char** pUnused) { if (IsGDIEnabled()) - return std::unique_ptr(new CFX_Win32FontInfo); + return std::unique_ptr(new CFX_Win32FontInfo); // Select the fallback font information class if GDI is disabled. CFX_Win32FallbackFontInfo* pInfoFallback = new CFX_Win32FallbackFontInfo; @@ -695,7 +695,7 @@ std::unique_ptr IFX_SystemFontInfo::CreateDefault( fonts_path += "\\Fonts"; pInfoFallback->AddPath(fonts_path); } - return std::unique_ptr(pInfoFallback); + return std::unique_ptr(pInfoFallback); } void CFX_GEModule::InitPlatform() { @@ -707,7 +707,7 @@ void CFX_GEModule::InitPlatform() { if (IsGDIEnabled()) pPlatformData->m_GdiplusExt.Load(); m_pPlatformData = pPlatformData; - m_pFontMgr->SetSystemFontInfo(IFX_SystemFontInfo::CreateDefault(nullptr)); + m_pFontMgr->SetSystemFontInfo(SystemFontInfoIface::CreateDefault(nullptr)); } void CFX_GEModule::DestroyPlatform() { @@ -1350,7 +1350,7 @@ CFX_WindowsRenderDevice::CFX_WindowsRenderDevice(HDC hDC) { CFX_WindowsRenderDevice::~CFX_WindowsRenderDevice() {} // static -IFX_RenderDeviceDriver* CFX_WindowsRenderDevice::CreateDriver(HDC hDC) { +RenderDeviceDriverIface* CFX_WindowsRenderDevice::CreateDriver(HDC hDC) { int device_type = ::GetDeviceCaps(hDC, TECHNOLOGY); int obj_type = ::GetObjectType(hDC); bool use_printer = device_type == DT_RASPRINTER || diff --git a/core/fxge/win32/win32_int.h b/core/fxge/win32/win32_int.h index f27a420734..34d307c2cd 100644 --- a/core/fxge/win32/win32_int.h +++ b/core/fxge/win32/win32_int.h @@ -14,7 +14,7 @@ #include "core/fxcrt/retain_ptr.h" #include "core/fxge/cfx_pathdata.h" -#include "core/fxge/ifx_renderdevicedriver.h" +#include "core/fxge/renderdevicedriver_iface.h" #include "core/fxge/win32/cfx_psrenderer.h" #include "core/fxge/win32/cpsoutput.h" #include "core/fxge/win32/dwrite_int.h" @@ -129,12 +129,12 @@ class CWin32Platform { CDWriteExt m_DWriteExt; }; -class CGdiDeviceDriver : public IFX_RenderDeviceDriver { +class CGdiDeviceDriver : public RenderDeviceDriverIface { protected: CGdiDeviceDriver(HDC hDC, int device_class); ~CGdiDeviceDriver() override; - // IFX_RenderDeviceDriver + // RenderDeviceDriverIface int GetDeviceCaps(int caps_id) const override; void SaveState() override; void RestoreState(bool bKeepSaved) override; @@ -270,13 +270,13 @@ class CGdiPrinterDriver : public CGdiDeviceDriver { const int m_VertSize; }; -class CPSPrinterDriver : public IFX_RenderDeviceDriver { +class CPSPrinterDriver : public RenderDeviceDriverIface { public: CPSPrinterDriver(HDC hDC, int ps_level, bool bCmykOutput); ~CPSPrinterDriver() override; protected: - // IFX_RenderDeviceDriver + // RenderDeviceDriverIface int GetDeviceCaps(int caps_id) const override; bool StartRendering() override; void EndRendering() override; @@ -335,13 +335,13 @@ class CPSPrinterDriver : public IFX_RenderDeviceDriver { CFX_PSRenderer m_PSRenderer; }; -class CTextOnlyPrinterDriver : public IFX_RenderDeviceDriver { +class CTextOnlyPrinterDriver : public RenderDeviceDriverIface { public: explicit CTextOnlyPrinterDriver(HDC hDC); ~CTextOnlyPrinterDriver() override; protected: - // IFX_RenderDeviceDriver + // RenderDeviceDriverIface int GetDeviceCaps(int caps_id) const override; void SaveState() override{}; void RestoreState(bool bKeepSaved) override{}; -- cgit v1.2.3