diff options
author | npm <npm@chromium.org> | 2016-11-28 13:51:28 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-11-28 13:51:28 -0800 |
commit | 3c0f366daafed42495b22ecbdda8f21f3f939d9b (patch) | |
tree | f19adaa6c18647789d827f03770014f4271ca7a9 /core/fpdfapi/render/cpdf_renderstatus.cpp | |
parent | 239915200225fea4c5a02e9630044ef13fccb66d (diff) | |
download | pdfium-3c0f366daafed42495b22ecbdda8f21f3f939d9b.tar.xz |
Add some methods in CPDF_ImageRenderer
Made a member private and added some methods to reduce code duplication
Review-Url: https://codereview.chromium.org/2531643002
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index e0c1c654ff..efad9db4c4 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1058,7 +1058,7 @@ bool CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject* pObj, if (m_pImageRenderer->Continue(pPause)) return true; - if (!m_pImageRenderer->m_Result) + if (!m_pImageRenderer->GetResult()) DrawObjWithBackground(pObj, pObj2Device); m_pImageRenderer.reset(); return false; @@ -1078,7 +1078,7 @@ bool CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject* pObj, m_pImageRenderer.reset(new CPDF_ImageRenderer); if (!m_pImageRenderer->Start(this, pObj, pObj2Device, false, FXDIB_BLEND_NORMAL)) { - if (!m_pImageRenderer->m_Result) + if (!m_pImageRenderer->GetResult()) DrawObjWithBackground(pObj, pObj2Device); m_pImageRenderer.reset(); return false; @@ -1900,7 +1900,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj, &image_matrix, 0, false, FXDIB_BLEND_NORMAL)) { renderer.Continue(nullptr); } - if (!renderer.m_Result) + if (!renderer.GetResult()) return false; } } @@ -2375,10 +2375,9 @@ void CPDF_RenderStatus::ProcessPathPattern(CPDF_PathObject* pPathObj, bool CPDF_RenderStatus::ProcessImage(CPDF_ImageObject* pImageObj, const CFX_Matrix* pObj2Device) { CPDF_ImageRenderer render; - if (render.Start(this, pImageObj, pObj2Device, m_bStdCS, m_curBlend)) { + if (render.Start(this, pImageObj, pObj2Device, m_bStdCS, m_curBlend)) render.Continue(nullptr); - } - return render.m_Result; + return render.GetResult(); } void CPDF_RenderStatus::CompositeDIBitmap(CFX_DIBitmap* pDIBitmap, |