summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-02-09 09:17:20 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-02-09 15:04:51 +0000
commit1b08df18300bbc67dabd12fb35ab6ce1732a1024 (patch)
tree9773931c8d18709860c9fbc1177e290e7713044e /core/fpdfapi/render
parentac2e04797b258115b2dc768a56377d7e78038f42 (diff)
downloadpdfium-1b08df18300bbc67dabd12fb35ab6ce1732a1024.tar.xz
Convert Get methods to return instead of using out params.
This Cl changes several Get methods to return their values instead of using out parameters. Change-Id: Ie9a930a5c2d0e809f2d7181ca033d801945c1cf9 Reviewed-on: https://pdfium-review.googlesource.com/2556 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: Nicolás Peña <npm@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp13
1 files changed, 5 insertions, 8 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index 86b9670cd1..1bdf4a0382 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1544,11 +1544,10 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj,
text_device.Attach(pTextMask.get(), false, nullptr, false);
for (uint32_t i = 0; i < pPageObj->m_ClipPath.GetTextCount(); i++) {
CPDF_TextObject* textobj = pPageObj->m_ClipPath.GetText(i);
- if (!textobj) {
+ if (!textobj)
break;
- }
- CFX_Matrix text_matrix;
- textobj->GetTextMatrix(&text_matrix);
+
+ CFX_Matrix text_matrix = textobj->GetTextMatrix();
CPDF_TextRenderer::DrawTextPath(
&text_device, textobj->m_nChars, textobj->m_pCharCodes,
textobj->m_pCharPos, textobj->m_TextState.GetFont(),
@@ -1732,8 +1731,7 @@ bool CPDF_RenderStatus::ProcessText(CPDF_TextObject* textobj,
fill_argb = GetFillArgb(textobj);
}
}
- CFX_Matrix text_matrix;
- textobj->GetTextMatrix(&text_matrix);
+ CFX_Matrix text_matrix = textobj->GetTextMatrix();
if (!IsAvailableMatrix(text_matrix))
return true;
@@ -1795,8 +1793,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj,
CFX_Matrix dCTM = m_pDevice->GetCTM();
FX_FLOAT sa = FXSYS_fabs(dCTM.a);
FX_FLOAT sd = FXSYS_fabs(dCTM.d);
- CFX_Matrix text_matrix;
- textobj->GetTextMatrix(&text_matrix);
+ CFX_Matrix text_matrix = textobj->GetTextMatrix();
CFX_Matrix char_matrix = pType3Font->GetFontMatrix();
FX_FLOAT font_size = textobj->m_TextState.GetFontSize();
char_matrix.Scale(font_size, font_size);