diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2018-01-17 15:28:26 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-01-17 15:28:26 +0000 |
commit | a49dc5b6fc0cb08991c111c747b35d9a4ec45b3f (patch) | |
tree | 5686a5f75471035881ce88774eedd5369befd2ae /xfa/fxfa/cxfa_imagerenderer.cpp | |
parent | 7577d5ccc34a6ab8d12d20766173338cb3466fb6 (diff) | |
download | pdfium-a49dc5b6fc0cb08991c111c747b35d9a4ec45b3f.tar.xz |
Remove flags param from CXFA_ImageRenderer
The flags are always set to the same value. This CL removes them and
inlines the value as needed.
Change-Id: I379a053aee31829229d83291d666904564b99aea
Reviewed-on: https://pdfium-review.googlesource.com/23057
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'xfa/fxfa/cxfa_imagerenderer.cpp')
-rw-r--r-- | xfa/fxfa/cxfa_imagerenderer.cpp | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/xfa/fxfa/cxfa_imagerenderer.cpp b/xfa/fxfa/cxfa_imagerenderer.cpp index dfa45f07d7..f6cb5e9317 100644 --- a/xfa/fxfa/cxfa_imagerenderer.cpp +++ b/xfa/fxfa/cxfa_imagerenderer.cpp @@ -15,18 +15,16 @@ CXFA_ImageRenderer::CXFA_ImageRenderer( CFX_RenderDevice* pDevice, const RetainPtr<CFX_DIBSource>& pDIBSource, - const CFX_Matrix* pImage2Device, - uint32_t flags) + const CFX_Matrix* pImage2Device) : m_pDevice(pDevice), m_ImageMatrix(*pImage2Device), - m_pDIBSource(pDIBSource), - m_Flags(flags) {} + m_pDIBSource(pDIBSource) {} CXFA_ImageRenderer::~CXFA_ImageRenderer() {} bool CXFA_ImageRenderer::Start() { if (m_pDevice->StartDIBitsWithBlend(m_pDIBSource, 255, 0, &m_ImageMatrix, - m_Flags, &m_DeviceHandle, + FXDIB_INTERPOL, &m_DeviceHandle, FXDIB_BLEND_NORMAL)) { if (m_DeviceHandle) { m_Status = 3; @@ -54,7 +52,7 @@ bool CXFA_ImageRenderer::Start() { clip_box.Intersect(image_rect); m_Status = 2; m_pTransformer = pdfium::MakeUnique<CFX_ImageTransformer>( - pDib, &m_ImageMatrix, m_Flags, &clip_box); + pDib, &m_ImageMatrix, FXDIB_INTERPOL, &clip_box); return true; } if (m_ImageMatrix.a < 0) @@ -66,15 +64,15 @@ bool CXFA_ImageRenderer::Start() { dest_top = dest_height > 0 ? image_rect.top : image_rect.bottom; if (m_pDIBSource->IsOpaqueImage()) { if (m_pDevice->StretchDIBitsWithFlagsAndBlend( - m_pDIBSource, dest_left, dest_top, dest_width, dest_height, m_Flags, - FXDIB_BLEND_NORMAL)) { + m_pDIBSource, dest_left, dest_top, dest_width, dest_height, + FXDIB_INTERPOL, FXDIB_BLEND_NORMAL)) { return false; } } if (m_pDIBSource->IsAlphaMask()) { if (m_pDevice->StretchBitMaskWithFlags(m_pDIBSource, dest_left, dest_top, dest_width, dest_height, 0, - m_Flags)) { + FXDIB_INTERPOL)) { return false; } } @@ -85,8 +83,8 @@ bool CXFA_ImageRenderer::Start() { FX_RECT dest_clip( dest_rect.left - image_rect.left, dest_rect.top - image_rect.top, dest_rect.right - image_rect.left, dest_rect.bottom - image_rect.top); - RetainPtr<CFX_DIBitmap> pStretched = - m_pDIBSource->StretchTo(dest_width, dest_height, m_Flags, &dest_clip); + RetainPtr<CFX_DIBitmap> pStretched = m_pDIBSource->StretchTo( + dest_width, dest_height, FXDIB_INTERPOL, &dest_clip); if (pStretched) CompositeDIBitmap(pStretched, dest_rect.left, dest_rect.top); @@ -151,8 +149,7 @@ void CXFA_ImageRenderer::CompositeDIBitmap( if (!pCloneConvert) return; - CXFA_ImageRenderer imageRender(m_pDevice, pCloneConvert, &m_ImageMatrix, - m_Flags); + CXFA_ImageRenderer imageRender(m_pDevice, pCloneConvert, &m_ImageMatrix); if (!imageRender.Start()) return; |