summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_imagerenderer.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-05 11:14:12 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-05 17:22:58 +0000
commit921fe6bfde3b4cf3da4b55fab77103af3a65cab4 (patch)
tree2587bf5ab7c8d72a085137c9986235c0c1514b2c /core/fpdfapi/render/cpdf_imagerenderer.cpp
parent023d645733cddcf026897c51f3d4c34090eb4b2d (diff)
downloadpdfium-921fe6bfde3b4cf3da4b55fab77103af3a65cab4.tar.xz
Move CPDF_RenderOptions members to private
This CL moves the members of CPDF_RenderOptions to be private members and adds accessor methods as needed. Change-Id: Ie91665ff53ae00cc4c53741d089d375503fabe11 Reviewed-on: https://pdfium-review.googlesource.com/15531 Reviewed-by: Ryan Harrison <rharrison@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_imagerenderer.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_imagerenderer.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index d71bcf49e5..6efc62c84b 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -76,8 +76,8 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
CPDF_GeneralState& state = m_pImageObject->m_GeneralState;
m_BitmapAlpha = FXSYS_round(255 * state.GetFillAlpha());
m_pDIBSource = m_Loader.m_pBitmap;
- if (m_pRenderStatus->GetRenderOptions()->m_ColorMode ==
- CPDF_RenderOptions::kAlpha &&
+ if (m_pRenderStatus->GetRenderOptions()->ColorModeIs(
+ CPDF_RenderOptions::kAlpha) &&
!m_Loader.m_pMask) {
return StartBitmapAlpha();
}
@@ -104,22 +104,22 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
m_bPatternColor = true;
}
m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject.Get());
- } else if (m_pRenderStatus->GetRenderOptions()->m_ColorMode ==
- CPDF_RenderOptions::kGray) {
+ } else if (m_pRenderStatus->GetRenderOptions()->ColorModeIs(
+ CPDF_RenderOptions::kGray)) {
m_pClone = m_pDIBSource->Clone(nullptr);
m_pClone->ConvertColorScale(0xffffff, 0);
m_pDIBSource = m_pClone;
}
m_Flags = 0;
- if (m_pRenderStatus->GetRenderOptions()->m_Flags & RENDER_FORCE_DOWNSAMPLE)
+ if (m_pRenderStatus->GetRenderOptions()->HasFlag(RENDER_FORCE_DOWNSAMPLE))
m_Flags |= RENDER_FORCE_DOWNSAMPLE;
- else if (m_pRenderStatus->GetRenderOptions()->m_Flags & RENDER_FORCE_HALFTONE)
+ else if (m_pRenderStatus->GetRenderOptions()->HasFlag(RENDER_FORCE_HALFTONE))
m_Flags |= RENDER_FORCE_HALFTONE;
if (m_pRenderStatus->GetRenderDevice()->GetDeviceClass() != FXDC_DISPLAY)
HandleFilters();
- if (m_pRenderStatus->GetRenderOptions()->m_Flags & RENDER_NOIMAGESMOOTH)
+ if (m_pRenderStatus->GetRenderOptions()->HasFlag(RENDER_NOIMAGESMOOTH))
m_Flags |= FXDIB_NOSMOOTH;
else if (m_pImageObject->GetImage()->IsInterpol())
m_Flags |= FXDIB_INTERPOL;
@@ -173,8 +173,8 @@ bool CPDF_ImageRenderer::Start(CPDF_RenderStatus* pStatus,
m_BlendType = blendType;
m_pObj2Device = pObj2Device;
CPDF_Dictionary* pOC = m_pImageObject->GetImage()->GetOC();
- if (pOC && m_pRenderStatus->GetRenderOptions()->m_pOCContext &&
- !m_pRenderStatus->GetRenderOptions()->m_pOCContext->CheckOCGVisible(
+ if (pOC && m_pRenderStatus->GetRenderOptions()->GetOCContext() &&
+ !m_pRenderStatus->GetRenderOptions()->GetOCContext()->CheckOCGVisible(
pOC)) {
return false;
}