From f82e2d7735d47d4139fe98a26cd955debf113e0c Mon Sep 17 00:00:00 2001 From: Dan Sinclair Date: Wed, 17 Jan 2018 15:16:07 +0000 Subject: Remove m_Result from CXFA_ImageRenderer The m_Result value is set but never used. Remove. Change-Id: Iba9e9a27b5d08072e2f810e0c6f574cb6880c87b Reviewed-on: https://pdfium-review.googlesource.com/23053 Reviewed-by: Ryan Harrison Commit-Queue: dsinclair --- xfa/fxfa/cxfa_imagerenderer.cpp | 24 ++++++++++-------------- xfa/fxfa/cxfa_imagerenderer.h | 1 - 2 files changed, 10 insertions(+), 15 deletions(-) diff --git a/xfa/fxfa/cxfa_imagerenderer.cpp b/xfa/fxfa/cxfa_imagerenderer.cpp index b1a5ee7200..4027a948f3 100644 --- a/xfa/fxfa/cxfa_imagerenderer.cpp +++ b/xfa/fxfa/cxfa_imagerenderer.cpp @@ -40,19 +40,17 @@ bool CXFA_ImageRenderer::Start() { int dest_height = image_rect.Height(); if ((fabs(m_ImageMatrix.b) >= 0.5f || m_ImageMatrix.a == 0) || (fabs(m_ImageMatrix.c) >= 0.5f || m_ImageMatrix.d == 0)) { - if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) { - m_Result = false; + if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) return false; - } + RetainPtr pDib = m_pDIBSource; if (m_pDIBSource->HasAlpha() && !(m_pDevice->GetRenderCaps() & FXRC_ALPHA_IMAGE) && !(m_pDevice->GetRenderCaps() & FXRC_GET_BITS)) { m_pCloneConvert = m_pDIBSource->CloneConvert(FXDIB_Rgb); - if (!m_pCloneConvert) { - m_Result = false; + if (!m_pCloneConvert) return false; - } + pDib = m_pCloneConvert; } FX_RECT clip_box = m_pDevice->GetClipBox(); @@ -83,10 +81,9 @@ bool CXFA_ImageRenderer::Start() { return false; } } - if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) { - m_Result = false; + if (m_bPrint && !(m_pDevice->GetRenderCaps() & FXRC_BLEND_MODE)) return true; - } + FX_RECT clip_box = m_pDevice->GetClipBox(); FX_RECT dest_rect = clip_box; dest_rect.Intersect(image_rect); @@ -112,12 +109,11 @@ bool CXFA_ImageRenderer::Continue() { return false; if (pBitmap->IsAlphaMask()) { - m_Result = m_pDevice->SetBitMask(pBitmap, m_pTransformer->result().left, - m_pTransformer->result().top, 0); + m_pDevice->SetBitMask(pBitmap, m_pTransformer->result().left, + m_pTransformer->result().top, 0); } else { - m_Result = m_pDevice->SetDIBitsWithBlend( - pBitmap, m_pTransformer->result().left, m_pTransformer->result().top, - m_BlendType); + m_pDevice->SetDIBitsWithBlend(pBitmap, m_pTransformer->result().left, + m_pTransformer->result().top, m_BlendType); } return false; } diff --git a/xfa/fxfa/cxfa_imagerenderer.h b/xfa/fxfa/cxfa_imagerenderer.h index ecf4f36dc3..e35a5f0a09 100644 --- a/xfa/fxfa/cxfa_imagerenderer.h +++ b/xfa/fxfa/cxfa_imagerenderer.h @@ -46,7 +46,6 @@ class CXFA_ImageRenderer { std::unique_ptr m_pTransformer; std::unique_ptr m_DeviceHandle; int32_t m_BlendType = FXDIB_BLEND_NORMAL; - bool m_Result = true; bool m_bPrint = false; }; -- cgit v1.2.3