diff options
Diffstat (limited to 'core/fxge/ge')
-rw-r--r-- | core/fxge/ge/cfx_facecache.cpp | 4 | ||||
-rw-r--r-- | core/fxge/ge/cfx_folderfontinfo.h | 3 | ||||
-rw-r--r-- | core/fxge/ge/cfx_font.cpp | 4 | ||||
-rw-r--r-- | core/fxge/ge/cfx_renderdevice.cpp | 9 |
4 files changed, 15 insertions, 5 deletions
diff --git a/core/fxge/ge/cfx_facecache.cpp b/core/fxge/ge/cfx_facecache.cpp index 9c79444dd3..6049729089 100644 --- a/core/fxge/ge/cfx_facecache.cpp +++ b/core/fxge/ge/cfx_facecache.cpp @@ -90,7 +90,7 @@ CFX_FaceCache::CFX_FaceCache(FXFT_Face face) CFX_FaceCache::~CFX_FaceCache() { #if defined _SKIA_SUPPORT_ || _SKIA_SUPPORT_PATHS_ - SkSafeUnref(m_pTypeface); + SkSafeUnref(m_pTypeface.Get()); #endif } @@ -370,7 +370,7 @@ CFX_TypeFace* CFX_FaceCache::GetDeviceCache(const CFX_Font* pFont) { new SkMemoryStream(pFont->GetFontData(), pFont->GetSize())); } #endif - return m_pTypeface; + return m_pTypeface.Get(); } #endif diff --git a/core/fxge/ge/cfx_folderfontinfo.h b/core/fxge/ge/cfx_folderfontinfo.h index 6aadb1526f..ad363b5f0d 100644 --- a/core/fxge/ge/cfx_folderfontinfo.h +++ b/core/fxge/ge/cfx_folderfontinfo.h @@ -11,6 +11,7 @@ #include <memory> #include <vector> +#include "core/fxcrt/cfx_unowned_ptr.h" #include "core/fxge/cfx_fontmapper.h" #include "core/fxge/fx_font.h" #include "core/fxge/ifx_systemfontinfo.h" @@ -62,7 +63,7 @@ class CFX_FolderFontInfo : public IFX_SystemFontInfo { std::map<CFX_ByteString, std::unique_ptr<CFX_FontFaceInfo>> m_FontList; std::vector<CFX_ByteString> m_PathList; - CFX_FontMapper* m_pMapper; + CFX_UnownedPtr<CFX_FontMapper> m_pMapper; }; #endif // CORE_FXGE_GE_CFX_FOLDERFONTINFO_H_ diff --git a/core/fxge/ge/cfx_font.cpp b/core/fxge/ge/cfx_font.cpp index 229ede7894..144675cdbd 100644 --- a/core/fxge/ge/cfx_font.cpp +++ b/core/fxge/ge/cfx_font.cpp @@ -28,12 +28,12 @@ namespace { -typedef struct { +struct OUTLINE_PARAMS { CFX_PathData* m_pPath; int m_CurX; int m_CurY; float m_CoordUnit; -} OUTLINE_PARAMS; +}; #ifdef PDF_ENABLE_XFA diff --git a/core/fxge/ge/cfx_renderdevice.cpp b/core/fxge/ge/cfx_renderdevice.cpp index f9153d1cdb..4404833758 100644 --- a/core/fxge/ge/cfx_renderdevice.cpp +++ b/core/fxge/ge/cfx_renderdevice.cpp @@ -1120,3 +1120,12 @@ bool CFX_RenderDevice::DrawTextPath(int nChars, } return true; } + +CFX_RenderDevice::StateRestorer::StateRestorer(CFX_RenderDevice* pDevice) + : m_pDevice(pDevice) { + m_pDevice->SaveState(); +} + +CFX_RenderDevice::StateRestorer::~StateRestorer() { + m_pDevice->RestoreState(false); +} |