summaryrefslogtreecommitdiff
path: root/core/fpdfapi/render/cpdf_renderstatus.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-08-01 16:20:47 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-02 18:35:18 +0000
commit4a0cbf9f0cb4f7e3bcbae68f82201b44fc94c231 (patch)
treedf967e2cf308b06cd604af2b4c0f929e8c26a71a /core/fpdfapi/render/cpdf_renderstatus.cpp
parent61899373fcf97ccbe525b001130bc71d61839498 (diff)
downloadpdfium-4a0cbf9f0cb4f7e3bcbae68f82201b44fc94c231.tar.xz
Pass a CPDF_ImageObject* into CPDF_ImageRenderer::Start().
Instead of passing in a CPDF_PageObject* and then converting it to an image, which is always what it is. Change-Id: I146a476147f4b344417982b5ace002b9bd7b3d80 Reviewed-on: https://pdfium-review.googlesource.com/9810 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/render/cpdf_renderstatus.cpp')
-rw-r--r--core/fpdfapi/render/cpdf_renderstatus.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp
index a08650500b..6c5d7bc102 100644
--- a/core/fpdfapi/render/cpdf_renderstatus.cpp
+++ b/core/fpdfapi/render/cpdf_renderstatus.cpp
@@ -1122,20 +1122,20 @@ bool CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject* pObj,
if (ProcessTransparency(pObj, pObj2Device))
return false;
- if (pObj->IsImage()) {
- m_pImageRenderer = pdfium::MakeUnique<CPDF_ImageRenderer>();
- if (!m_pImageRenderer->Start(this, pObj, pObj2Device, false,
- FXDIB_BLEND_NORMAL)) {
- if (!m_pImageRenderer->GetResult())
- DrawObjWithBackground(pObj, pObj2Device);
- m_pImageRenderer.reset();
- return false;
- }
- return ContinueSingleObject(pObj, pObj2Device, pPause);
+ if (!pObj->IsImage()) {
+ ProcessObjectNoClip(pObj, pObj2Device);
+ return false;
}
- ProcessObjectNoClip(pObj, pObj2Device);
- return false;
+ m_pImageRenderer = pdfium::MakeUnique<CPDF_ImageRenderer>();
+ if (!m_pImageRenderer->Start(this, pObj->AsImage(), pObj2Device, false,
+ FXDIB_BLEND_NORMAL)) {
+ if (!m_pImageRenderer->GetResult())
+ DrawObjWithBackground(pObj, pObj2Device);
+ m_pImageRenderer.reset();
+ return false;
+ }
+ return ContinueSingleObject(pObj, pObj2Device, pPause);
}
bool CPDF_RenderStatus::GetObjectClippedRect(const CPDF_PageObject* pObj,