summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-04 13:30:29 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-04 20:43:36 +0000
commitd74da7bb34abdae254df64ba2c0da7a581f6dae0 (patch)
tree353d21b86c4928e1d23aa54481591ecf7ad907ff /core/fpdfapi/render/cpdf_renderstatus.cpp
parentd41f4752c81d2dc8635595df7a9ab2b07f571c53 (diff)
downloadpdfium-d74da7bb34abdae254df64ba2c0da7a581f6dae0.tar.xz
Make CPDF_Font member variables protected.
Change-Id: I5d452ea907f4d243645ddae3512776096a827522 Reviewed-on: https://pdfium-review.googlesource.com/4872 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index d41561c057..0b304747d4 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -66,7 +66,7 @@
namespace {
void ReleaseCachedType3(CPDF_Type3Font* pFont) {
- CPDF_Document* pDoc = pFont->m_pDocument;
+ CPDF_Document* pDoc = pFont->GetDocument();
if (!pDoc)
return;
@@ -1799,7 +1799,7 @@ bool CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj,
CFX_RetainPtr<CPDF_Type3Cache> CPDF_RenderStatus::GetCachedType3(
CPDF_Type3Font* pFont) {
- CPDF_Document* pDoc = pFont->m_pDocument;
+ CPDF_Document* pDoc = pFont->GetDocument();
if (!pDoc)
return nullptr;
@@ -2000,10 +2000,9 @@ void CPDF_RenderStatus::DrawTextPathWithPattern(const CPDF_TextObject* textobj,
CharPosList.Load(textobj->m_CharCodes, textobj->m_CharPos, pFont, font_size);
for (uint32_t i = 0; i < CharPosList.m_nChars; i++) {
FXTEXT_CHARPOS& charpos = CharPosList.m_pCharPos[i];
- auto* font =
- charpos.m_FallbackFontPosition == -1
- ? &pFont->m_Font
- : pFont->m_FontFallbacks[charpos.m_FallbackFontPosition].get();
+ auto* font = charpos.m_FallbackFontPosition == -1
+ ? pFont->GetFont()
+ : pFont->GetFontFallback(charpos.m_FallbackFontPosition);
const CFX_PathData* pPath =
font->LoadGlyphPath(charpos.m_GlyphIndex, charpos.m_FontCharWidth);
if (!pPath)