diff options
author | Lei Zhang <thestig@chromium.org> | 2018-05-07 22:55:46 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-07 22:55:46 +0000 |
commit | 0cc77c9ef74f527a6887d9a2e8ebcb6412615f30 (patch) | |
tree | 5dd3b8bf31fdcb730cd620e2e8980bf4b58aa9f1 /core/fpdfapi/render | |
parent | c732e9aa64a82c06c0ad369088d0481dd2636b86 (diff) | |
download | pdfium-0cc77c9ef74f527a6887d9a2e8ebcb6412615f30.tar.xz |
Add some getters for CPDF_PageObjectHolder.
Change-Id: I3fe99ecb17d37f893ce5d0d59219c82ee31fe7ea
Reviewed-on: https://pdfium-review.googlesource.com/32110
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/render')
-rw-r--r-- | core/fpdfapi/render/cpdf_imagerenderer.cpp | 2 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_pagerendercache.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_progressiverenderer.cpp | 4 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_rendercontext.cpp | 10 | ||||
-rw-r--r-- | core/fpdfapi/render/cpdf_renderstatus.cpp | 28 |
5 files changed, 24 insertions, 24 deletions
diff --git a/core/fpdfapi/render/cpdf_imagerenderer.cpp b/core/fpdfapi/render/cpdf_imagerenderer.cpp index 3844f69895..e9e6420632 100644 --- a/core/fpdfapi/render/cpdf_imagerenderer.cpp +++ b/core/fpdfapi/render/cpdf_imagerenderer.cpp @@ -142,7 +142,7 @@ bool CPDF_ImageRenderer::StartRenderDIBSource() { CPDF_Page* pPage = nullptr; if (auto* pPageCache = m_pRenderStatus->GetContext()->GetPageCache()) { pPage = pPageCache->GetPage(); - pDocument = pPage->m_pDocument.Get(); + pDocument = pPage->GetDocument(); } else { pDocument = m_pImageObject->GetImage()->GetDocument(); } diff --git a/core/fpdfapi/render/cpdf_pagerendercache.cpp b/core/fpdfapi/render/cpdf_pagerendercache.cpp index a929cb69c7..1358943454 100644 --- a/core/fpdfapi/render/cpdf_pagerendercache.cpp +++ b/core/fpdfapi/render/cpdf_pagerendercache.cpp @@ -92,7 +92,7 @@ bool CPDF_PageRenderCache::StartGetCachedBitmap( m_pCurImageCacheEntry = it->second; } else { m_pCurImageCacheEntry = - new CPDF_ImageCacheEntry(m_pPage->m_pDocument.Get(), pImage); + new CPDF_ImageCacheEntry(m_pPage->GetDocument(), pImage); } CPDF_DIBSource::LoadState ret = m_pCurImageCacheEntry->StartGetCachedBitmap( pRenderStatus->GetFormResource(), m_pPage->m_pPageResources.Get(), bStdCS, @@ -134,7 +134,7 @@ void CPDF_PageRenderCache::ResetBitmap(const RetainPtr<CPDF_Image>& pImage, if (!pBitmap) return; - pEntry = new CPDF_ImageCacheEntry(m_pPage->m_pDocument.Get(), pImage); + pEntry = new CPDF_ImageCacheEntry(m_pPage->GetDocument(), pImage); m_ImageCache[pStream] = pEntry; } else { pEntry = it->second; diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp index b2d16300d4..e388f7fa10 100644 --- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp +++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp @@ -57,8 +57,8 @@ void CPDF_ProgressiveRenderer::Continue(PauseIndicatorIface* pPause) { m_pRenderStatus = pdfium::MakeUnique<CPDF_RenderStatus>(); m_pRenderStatus->Initialize( m_pContext.Get(), m_pDevice.Get(), nullptr, nullptr, nullptr, nullptr, - m_pOptions, m_pCurrentLayer->m_pObjectHolder->m_iTransparency, false, - nullptr); + m_pOptions, m_pCurrentLayer->m_pObjectHolder->GetTransparency(), + false, nullptr); m_pDevice->SaveState(); m_ClipRect = m_pCurrentLayer->m_Matrix.GetInverse().TransformRect( CFX_FloatRect(m_pDevice->GetClipBox())); diff --git a/core/fpdfapi/render/cpdf_rendercontext.cpp b/core/fpdfapi/render/cpdf_rendercontext.cpp index 73f9a4c3ff..fc756e7a90 100644 --- a/core/fpdfapi/render/cpdf_rendercontext.cpp +++ b/core/fpdfapi/render/cpdf_rendercontext.cpp @@ -21,7 +21,7 @@ #include "core/fxge/fx_dib.h" CPDF_RenderContext::CPDF_RenderContext(CPDF_Page* pPage) - : m_pDocument(pPage->m_pDocument.Get()), + : m_pDocument(pPage->GetDocument()), m_pPageResources(pPage->m_pPageResources.Get()), m_pPageCache(pPage->GetRenderCache()) {} @@ -70,13 +70,13 @@ void CPDF_RenderContext::Render(CFX_RenderDevice* pDevice, CFX_Matrix FinalMatrix = layer.m_Matrix; FinalMatrix.Concat(*pLastMatrix); status.Initialize(this, pDevice, pLastMatrix, pStopObj, nullptr, nullptr, - pOptions, layer.m_pObjectHolder->m_iTransparency, false, - nullptr); + pOptions, layer.m_pObjectHolder->GetTransparency(), + false, nullptr); status.RenderObjectList(layer.m_pObjectHolder.Get(), &FinalMatrix); } else { status.Initialize(this, pDevice, nullptr, pStopObj, nullptr, nullptr, - pOptions, layer.m_pObjectHolder->m_iTransparency, false, - nullptr); + pOptions, layer.m_pObjectHolder->GetTransparency(), + false, nullptr); status.RenderObjectList(layer.m_pObjectHolder.Get(), &layer.m_Matrix); } if (status.GetRenderOptions()->HasFlag(RENDER_LIMITEDIMAGECACHE)) { diff --git a/core/fpdfapi/render/cpdf_renderstatus.cpp b/core/fpdfapi/render/cpdf_renderstatus.cpp index 4df9f18375..f9261570fe 100644 --- a/core/fpdfapi/render/cpdf_renderstatus.cpp +++ b/core/fpdfapi/render/cpdf_renderstatus.cpp @@ -1241,7 +1241,7 @@ void CPDF_RenderStatus::DrawObjWithBackground(CPDF_PageObject* pObj, CPDF_Dictionary* pFormResource = nullptr; const CPDF_FormObject* pFormObj = pObj->AsForm(); if (pFormObj) { - const auto& pFormDict = pFormObj->form()->m_pFormDict; + const CPDF_Dictionary* pFormDict = pFormObj->form()->GetFormDict(); if (pFormDict) pFormResource = pFormDict->GetDictFor("Resources"); } @@ -1258,14 +1258,14 @@ bool CPDF_RenderStatus::ProcessForm(const CPDF_FormObject* pFormObj, #if defined _SKIA_SUPPORT_ DebugVerifyDeviceIsPreMultiplied(); #endif - CPDF_Dictionary* pOC = pFormObj->form()->m_pFormDict->GetDictFor("OC"); + CPDF_Dictionary* pOC = pFormObj->form()->GetFormDict()->GetDictFor("OC"); if (pOC && m_Options.GetOCContext() && !m_Options.GetOCContext()->CheckOCGVisible(pOC)) { return true; } CFX_Matrix matrix = pFormObj->form_matrix(); matrix.Concat(*pObj2Device); - const auto& pFormDict = pFormObj->form()->m_pFormDict; + const CPDF_Dictionary* pFormDict = pFormObj->form()->GetFormDict(); CPDF_Dictionary* pResources = pFormDict ? pFormDict->GetDictFor("Resources") : nullptr; CPDF_RenderStatus status; @@ -1487,9 +1487,9 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj, const CPDF_FormObject* pFormObj = pPageObj->AsForm(); if (pFormObj) { group_alpha = pFormObj->m_GeneralState.GetFillAlpha(); - iTransparency = pFormObj->form()->m_iTransparency; + iTransparency = pFormObj->form()->GetTransparency(); bGroupTransparent = !!(iTransparency & PDFTRANS_ISOLATED); - const auto& pFormDict = pFormObj->form()->m_pFormDict; + const CPDF_Dictionary* pFormDict = pFormObj->form()->GetFormDict(); if (pFormDict) pFormResource = pFormDict->GetDictFor("Resources"); } @@ -1505,7 +1505,7 @@ bool CPDF_RenderStatus::ProcessTransparency(CPDF_PageObject* pPageObj, CPDF_Page* pPage = nullptr; if (m_pContext->GetPageCache()) { pPage = m_pContext->GetPageCache()->GetPage(); - pDocument = pPage->m_pDocument.Get(); + pDocument = pPage->GetDocument(); } else { pDocument = pPageObj->AsImage()->GetImage()->GetDocument(); } @@ -1879,15 +1879,15 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj, options.SetFlags(option_flags); CPDF_Dictionary* pFormResource = nullptr; - if (pType3Char->form() && pType3Char->form()->m_pFormDict) { + if (pType3Char->form() && pType3Char->form()->GetFormDict()) { pFormResource = - pType3Char->form()->m_pFormDict->GetDictFor("Resources"); + pType3Char->form()->GetFormDict()->GetDictFor("Resources"); } if (fill_alpha == 255) { CPDF_RenderStatus status; status.Initialize(m_pContext.Get(), m_pDevice, nullptr, nullptr, this, pStates.get(), &options, - pType3Char->form()->m_iTransparency, m_bDropObjects, + pType3Char->form()->GetTransparency(), m_bDropObjects, pFormResource, false, pType3Char, fill_argb); status.m_Type3FontCache = m_Type3FontCache; status.m_Type3FontCache.push_back(pType3Font); @@ -1907,7 +1907,7 @@ bool CPDF_RenderStatus::ProcessType3Text(CPDF_TextObject* textobj, CPDF_RenderStatus status; status.Initialize(m_pContext.Get(), &bitmap_device, nullptr, nullptr, this, pStates.get(), &options, - pType3Char->form()->m_iTransparency, m_bDropObjects, + pType3Char->form()->GetTransparency(), m_bDropObjects, pFormResource, false, pType3Char, fill_argb); status.m_Type3FontCache = m_Type3FontCache; status.m_Type3FontCache.push_back(pType3Font); @@ -2247,7 +2247,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, if (!pPattern->colored()) pStates = CloneObjStates(pPageObj, bStroke); - auto& pFormDict = pPattern->form()->m_pFormDict; + const CPDF_Dictionary* pFormDict = pPattern->form()->GetFormDict(); CPDF_Dictionary* pFormResource = pFormDict ? pFormDict->GetDictFor("Resources") : nullptr; for (int col = min_col; col <= max_col; col++) { @@ -2261,7 +2261,7 @@ void CPDF_RenderStatus::DrawTilingPattern(CPDF_TilingPattern* pPattern, CPDF_RenderStatus status; status.Initialize(m_pContext.Get(), m_pDevice, nullptr, nullptr, this, pStates.get(), &m_Options, - pPattern->form()->m_iTransparency, m_bDropObjects, + pPattern->form()->GetTransparency(), m_bDropObjects, pFormResource); status.RenderObjectList(pPattern->form(), &matrix); } @@ -2611,8 +2611,8 @@ RetainPtr<CFX_DIBitmap> CPDF_RenderStatus::LoadSMask( bitmap.Clear(0); } CPDF_Dictionary* pFormResource = nullptr; - if (form.m_pFormDict) { - pFormResource = form.m_pFormDict->GetDictFor("Resources"); + if (form.GetFormDict()) { + pFormResource = form.GetFormDict()->GetDictFor("Resources"); } CPDF_RenderOptions options; options.SetColorMode(bLuminosity ? CPDF_RenderOptions::kNormal |