summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_view.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-04 18:26:07 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-04 18:26:07 +0000
commitf06ed6d3578fff9e1d2990e5757dc460e60e5dd3 (patch)
tree80a0b51c34053bcce961d43905afaef33b33c4da /fpdfsdk/fpdf_view.cpp
parent168c763539e70bea450701470c47a8991f578336 (diff)
downloadpdfium-f06ed6d3578fff9e1d2990e5757dc460e60e5dd3.tar.xz
Revert "Make CPDF_Document cache CPDF_Pages"
This reverts commit f0d9d28a034fe3650c3c2d662090c1e8687ddb16. Reason for revert: avoid parsing page. Change-Id: Id3478f7e38f1cbe95d098e00158b1d7d9dc6f76e Reviewed-on: https://pdfium-review.googlesource.com/33750 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fpdfsdk/fpdf_view.cpp')
-rw-r--r--fpdfsdk/fpdf_view.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index e38c651cbe..1b33952204 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -360,7 +360,8 @@ FPDF_EXPORT FPDF_PAGE FPDF_CALLCONV FPDF_LoadPage(FPDF_DOCUMENT document,
if (!pDict)
return nullptr;
- RetainPtr<CPDF_Page> pPage = pDoc->GetOrCreatePDFPage(pDict);
+ auto pPage = pdfium::MakeRetain<CPDF_Page>(pDoc, pDict, true);
+ pPage->ParseContent();
return FPDFPageFromUnderlying(pPage.Leak());
#endif // PDF_ENABLE_XFA
}
@@ -958,7 +959,7 @@ FPDF_EXPORT int FPDF_CALLCONV FPDF_GetPageSizeByIndex(FPDF_DOCUMENT document,
if (!pDict)
return false;
- RetainPtr<CPDF_Page> page = pDoc->GetOrCreatePDFPage(pDict);
+ auto page = pdfium::MakeRetain<CPDF_Page>(pDoc, pDict, true);
*width = page->GetPageWidth();
*height = page->GetPageHeight();
return true;