summaryrefslogtreecommitdiff
path: root/core/fpdfapi/fpdf_render
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-08-29 10:24:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-08-29 10:24:19 -0700
commitd09a09751f724ecdb1a0bc307447a3d0c212ebff (patch)
tree917a2986be9769a6bfaf8ac4cc96a8a4006eed82 /core/fpdfapi/fpdf_render
parenta032f7f79c67ddef4db0f44fca8f0d245bfb8e82 (diff)
downloadpdfium-d09a09751f724ecdb1a0bc307447a3d0c212ebff.tar.xz
Replace wrapper methods in CPDF_Path with -> operator.
These just invoked exaclty the same methodes in the underlying xxxData class, which we can now do with just a ->() Move some methods to the xxxData class, where they belong. In doing so, put MakePrivateCopy() calls at each callsite for those methods that made a copy. Review-Url: https://codereview.chromium.org/2286983002
Diffstat (limited to 'core/fpdfapi/fpdf_render')
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render.cpp4
-rw-r--r--core/fpdfapi/fpdf_render/fpdf_render_text.cpp8
2 files changed, 6 insertions, 6 deletions
diff --git a/core/fpdfapi/fpdf_render/fpdf_render.cpp b/core/fpdfapi/fpdf_render/fpdf_render.cpp
index f5ab9696c7..447cc04f06 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render.cpp
@@ -809,8 +809,8 @@ FX_BOOL CPDF_RenderStatus::ProcessTransparency(const CPDF_PageObject* pPageObj,
textobj->GetTextMatrix(&text_matrix);
CPDF_TextRenderer::DrawTextPath(
&text_device, textobj->m_nChars, textobj->m_pCharCodes,
- textobj->m_pCharPos, textobj->m_TextState.GetFont(),
- textobj->m_TextState.GetFontSize(), &text_matrix, &new_matrix,
+ textobj->m_pCharPos, textobj->m_TextState->GetFont(),
+ textobj->m_TextState->GetFontSize(), &text_matrix, &new_matrix,
textobj->m_GraphState.GetObject(), (FX_ARGB)-1, 0, nullptr, 0);
}
}
diff --git a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
index 4b59f1d61a..387ecff27c 100644
--- a/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
+++ b/core/fpdfapi/fpdf_render/fpdf_render_text.cpp
@@ -235,7 +235,7 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
if (text_render_mode == TextRenderingMode::MODE_INVISIBLE)
return TRUE;
- CPDF_Font* pFont = textobj->m_TextState.GetFont();
+ CPDF_Font* pFont = textobj->m_TextState->GetFont();
if (pFont->IsType3Font())
return ProcessType3Text(textobj, pObj2Device);
@@ -297,7 +297,7 @@ FX_BOOL CPDF_RenderStatus::ProcessText(const CPDF_TextObject* textobj,
if (!IsAvailableMatrix(text_matrix))
return TRUE;
- FX_FLOAT font_size = textobj->m_TextState.GetFontSize();
+ FX_FLOAT font_size = textobj->m_TextState->GetFontSize();
if (bPattern) {
DrawTextPathWithPattern(textobj, pObj2Device, pFont, font_size,
&text_matrix, bFill, bStroke);
@@ -373,7 +373,7 @@ class CPDF_RefType3Cache {
// TODO(npm): Font fallback for type 3 fonts? (Completely separate code!!)
FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
const CFX_Matrix* pObj2Device) {
- CPDF_Type3Font* pType3Font = textobj->m_TextState.GetFont()->AsType3Font();
+ CPDF_Type3Font* pType3Font = textobj->m_TextState->GetFont()->AsType3Font();
for (int i = 0; i < m_Type3FontCache.GetSize(); ++i) {
if (m_Type3FontCache.GetAt(i) == pType3Font)
return TRUE;
@@ -385,7 +385,7 @@ FX_BOOL CPDF_RenderStatus::ProcessType3Text(const CPDF_TextObject* textobj,
CFX_Matrix text_matrix;
textobj->GetTextMatrix(&text_matrix);
CFX_Matrix char_matrix = pType3Font->GetFontMatrix();
- FX_FLOAT font_size = textobj->m_TextState.GetFontSize();
+ FX_FLOAT font_size = textobj->m_TextState->GetFontSize();
char_matrix.Scale(font_size, font_size);
FX_ARGB fill_argb = GetFillArgb(textobj, TRUE);
int fill_alpha = FXARGB_A(fill_argb);