diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2018-07-05 16:55:48 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-05 16:55:48 +0000 |
commit | 6c4ca9f597ae84550e0b8a4323e44b188f9bb274 (patch) | |
tree | 6f1cb0f180279e943d5e6ed463bfb17edf154bd8 /core/fpdfapi/render | |
parent | 3fab31fb8e35eca693322ac292228e993b508102 (diff) | |
download | pdfium-6c4ca9f597ae84550e0b8a4323e44b188f9bb274.tar.xz |
Delete CPDF_ContentMark::HasRef()
This is called by many client to make sure CountItems() does not
crash. Moving the check to CountItems() makes HasRef() unnecessary.
Bug: pdfium:1037
Change-Id: I4f21f33a88c9aad54f0dae18a38b370c6ceaec80
Reviewed-on: https://pdfium-review.googlesource.com/37133
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Reviewed-by: Ryan Harrison <rharrison@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 29a30157df..433d32b886 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1100,10 +1100,9 @@ void CPDF_RenderStatus::RenderSingleObject(CPDF_PageObject* pObj, return; } m_pCurObj = pObj; - if (m_Options.GetOCContext() && pObj->m_ContentMark.HasRef()) { - if (!m_Options.GetOCContext()->CheckObjectVisible(pObj)) { - return; - } + if (m_Options.GetOCContext() && + !m_Options.GetOCContext()->CheckObjectVisible(pObj)) { + return; } ProcessClipPath(pObj->m_ClipPath, pObj2Device); if (ProcessTransparency(pObj, pObj2Device)) { @@ -1129,7 +1128,7 @@ bool CPDF_RenderStatus::ContinueSingleObject(CPDF_PageObject* pObj, } m_pCurObj = pObj; - if (m_Options.GetOCContext() && pObj->m_ContentMark.HasRef() && + if (m_Options.GetOCContext() && !m_Options.GetOCContext()->CheckObjectVisible(pObj)) { return false; } |