diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-05-25 22:38:49 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-05-25 22:38:49 +0000 |
commit | 2aa4b2f3928ccd8393f60db8f7b740c75f4e8a8d (patch) | |
tree | 3c31b98ac48d5bb95c782cfe3c754037e66119d9 /fpdfsdk/cpdfsdk_pageview.cpp | |
parent | b1ec280837cc6e1932754ef40de26d12b77aa910 (diff) | |
download | pdfium-2aa4b2f3928ccd8393f60db8f7b740c75f4e8a8d.tar.xz |
Make CPDF_Page retainable.
Small step to reducing the differences between XFA and non-XFA. We
still use the RetainPtr pretty much as if it were an unique_ptr, in
that we're not yet caching pages and handing out multiple pointers
to the same page in the non-XFA case.
The one change is in page view cleanup, where we no longer need a
boolean and can take (sufficient) page ownership with a RetainPtr.
Tidy up some document.h -> page.h -> document.h circular inclusion
while we're at it.
NOTE: Wait for imminent branch to pass before landing. We'll want
this to bake a while.
Change-Id: I64a2f12ac3424ece1063d40583995b834117cf34
Reviewed-on: https://pdfium-review.googlesource.com/32790
Reviewed-by: dsinclair <dsinclair@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/cpdfsdk_pageview.cpp')
-rw-r--r-- | fpdfsdk/cpdfsdk_pageview.cpp | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/fpdfsdk/cpdfsdk_pageview.cpp b/fpdfsdk/cpdfsdk_pageview.cpp index 2eab6ca32b..c86adf323d 100644 --- a/fpdfsdk/cpdfsdk_pageview.cpp +++ b/fpdfsdk/cpdfsdk_pageview.cpp @@ -32,15 +32,7 @@ CPDFSDK_PageView::CPDFSDK_PageView(CPDFSDK_FormFillEnvironment* pFormFillEnv, UnderlyingPageType* page) - : m_page(page), - m_pFormFillEnv(pFormFillEnv), -#ifndef PDF_ENABLE_XFA - m_bOwnsPage(false), -#endif // PDF_ENABLE_XFA - m_bOnWidget(false), - m_bValid(false), - m_bLocked(false), - m_bBeingDestroyed(false) { + : m_page(page), m_pFormFillEnv(pFormFillEnv) { CPDFSDK_InterForm* pInterForm = pFormFillEnv->GetInterForm(); CPDF_InterForm* pPDFInterForm = pInterForm->GetInterForm(); #ifdef PDF_ENABLE_XFA @@ -67,11 +59,6 @@ CPDFSDK_PageView::~CPDFSDK_PageView() { m_SDKAnnotArray.clear(); m_pAnnotList.reset(); - -#ifndef PDF_ENABLE_XFA - if (m_bOwnsPage) - delete m_page; -#endif // PDF_ENABLE_XFA } void CPDFSDK_PageView::PageView_OnDraw(CFX_RenderDevice* pDevice, |