summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_imagerenderer.cpp
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-07-13 14:53:28 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-13 19:34:45 +0000
commitf55e72e0476e5f5699b887099f213982e207afd0 (patch)
tree5108b56962094fb7588f4f860fc3bb9c9f00e3c3 /core/fpdfapi/render/cpdf_imagerenderer.cpp
parent7f55a5410f665cfdbb5796d6d9a5387a5f6fa2eb (diff)
downloadpdfium-f55e72e0476e5f5699b887099f213982e207afd0.tar.xz
Cleanup CPDF_RenderOptions colour members.
This CL removes the fore/back colours in favour of just using the colours inline and converts the m_ColorMode to an enum. Change-Id: I1796e200d5c470680126af8625d45fc3062a1042 Reviewed-on: https://pdfium-review.googlesource.com/7751 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Reviewed-by: Nicolás Peña <npm@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.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp
index 6fcf89c83a..e6280772c8 100644
--- a/core/fpdfapi/render/cpdf_imagerenderer.cpp
+++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp
@@ -76,7 +76,7 @@ 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->m_Options.m_ColorMode == RENDER_COLOR_ALPHA &&
+ if (m_pRenderStatus->m_Options.m_ColorMode == CPDF_RenderOptions::kAlpha &&
!m_Loader.m_pMask) {
return StartBitmapAlpha();
}
@@ -103,10 +103,10 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() {
m_bPatternColor = true;
}
m_FillArgb = m_pRenderStatus->GetFillArgb(m_pImageObject.Get());
- } else if (m_pRenderStatus->m_Options.m_ColorMode == RENDER_COLOR_GRAY) {
+ } else if (m_pRenderStatus->m_Options.m_ColorMode ==
+ CPDF_RenderOptions::kGray) {
m_pClone = m_pDIBSource->Clone(nullptr);
- m_pClone->ConvertColorScale(m_pRenderStatus->m_Options.m_BackColor,
- m_pRenderStatus->m_Options.m_ForeColor);
+ m_pClone->ConvertColorScale(0xffffff, 0);
m_pDIBSource = m_pClone;
}
m_Flags = 0;