summaryrefslogtreecommitdiff
path: root/core/fxge/ge
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-25 15:53:57 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-25 23:07:41 +0000
commitd0409afc6a994a3e24043b8a96c83c022bcaa189 (patch)
tree15fa78b8a601ec97fc8bee39f8e56590c37babe3 /core/fxge/ge
parent2eddb665763f3e089d4c210d2a011d112683f3ea (diff)
downloadpdfium-d0409afc6a994a3e24043b8a96c83c022bcaa189.tar.xz
Mass conversion of remaining class members (non-xfa)
Change-Id: I8365ba80e3395d59a3cf35dbd9d9162e86e712e3 Reviewed-on: https://pdfium-review.googlesource.com/5970 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fxge/ge')
-rw-r--r--core/fxge/ge/cfx_facecache.cpp4
-rw-r--r--core/fxge/ge/cfx_folderfontinfo.h3
-rw-r--r--core/fxge/ge/cfx_font.cpp4
-rw-r--r--core/fxge/ge/cfx_renderdevice.cpp9
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);
+}