diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-08-16 20:58:38 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-08-16 20:58:38 +0000 |
commit | d5e282648a08a0b68c30edce51fafeeb5d76db7b (patch) | |
tree | d2aee0527f3c95cc66a75a42c5ef872893c9e8fb /core/fpdfapi/render | |
parent | b2e6b4c44a38ea2ca9e021df31cd27eb67a45e35 (diff) | |
download | pdfium-d5e282648a08a0b68c30edce51fafeeb5d76db7b.tar.xz |
Remove optional bool bType from GetFillArgb()
Two variants make the intention much clearer.
Change-Id: Ied0d8e6fa8c5524c19cafe8036d7c1b470fda86d
Reviewed-on: https://pdfium-review.googlesource.com/40352
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 6 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.h | 10 |
2 files changed, 12 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index f8a2b5de75..5e554623df 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1291,8 +1291,8 @@ RetainPtr<CPDF_TransferFunc> CPDF_RenderStatus::GetTransferFunc( return pDocCache ? pDocCache->GetTransferFunc(pObj) : nullptr; } -FX_ARGB CPDF_RenderStatus::GetFillArgb(CPDF_PageObject* pObj, - bool bType3) const { +FX_ARGB CPDF_RenderStatus::GetFillArgbInternal(CPDF_PageObject* pObj, + bool bType3) const { const CPDF_ColorState* pColorState = &pObj->m_ColorState; if (!bType3 && Type3CharMissingFillColor(m_pType3Char.Get(), pColorState)) return m_T3FillColor; @@ -1808,7 +1808,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj, CFX_Matrix char_matrix = pType3Font->GetFontMatrix(); float font_size = textobj->m_TextState.GetFontSize(); char_matrix.Scale(font_size, font_size); - FX_ARGB fill_argb = GetFillArgb(textobj, true); + FX_ARGB fill_argb = GetFillArgbForType3(textobj); int fill_alpha = FXARGB_A(fill_argb); int device_class = m_pDevice->GetDeviceClass(); std::vector<FXTEXT_GLYPHPOS> glyphs; diff --git a/core/fpdfapi/render/cpdf_renderstatus.h b/core/fpdfapi/render/cpdf_renderstatus.h index b15c1d1482..a7e845f237 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.h +++ b/core/fpdfapi/render/cpdf_renderstatus.h @@ -89,7 +89,14 @@ class CPDF_RenderStatus { RetainPtr<CPDF_TransferFunc> GetTransferFunc( const CPDF_Object* pObject) const; - FX_ARGB GetFillArgb(CPDF_PageObject* pObj, bool bType3 = false) const; + + FX_ARGB GetFillArgb(CPDF_PageObject* pObj) const { + return GetFillArgbInternal(pObj, false); + } + FX_ARGB GetFillArgbForType3(CPDF_PageObject* pObj) const { + return GetFillArgbInternal(pObj, true); + } + void DrawTilingPattern(CPDF_TilingPattern* pPattern, CPDF_PageObject* pPageObj, const CFX_Matrix* pObj2Device, @@ -107,6 +114,7 @@ class CPDF_RenderStatus { const CPDF_Transparency& transparency); private: + FX_ARGB GetFillArgbInternal(CPDF_PageObject* pObj, bool bType3) const; bool ProcessTransparency(CPDF_PageObject* PageObj, const CFX_Matrix* pObj2Device); void ProcessObjectNoClip(CPDF_PageObject* PageObj, |