summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_progressive.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-14 14:17:26 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-14 14:17:26 -0700
commitdfbf8e7ba55695c4e6cb30eadbe9c6a2955815ba (patch)
tree58eef2a1e6763f71926524827da0f220f761f960 /fpdfsdk/src/fpdf_progressive.cpp
parent758ae14e113c07285126274577d7a5cab559fa65 (diff)
downloadpdfium-dfbf8e7ba55695c4e6cb30eadbe9c6a2955815ba.tar.xz
Next round of XFA changes to match master.
This contains a missed merge of the Document:delay fixes. R=thestig@chromium.org Review URL: https://codereview.chromium.org/1398703009 .
Diffstat (limited to 'fpdfsdk/src/fpdf_progressive.cpp')
-rw-r--r--fpdfsdk/src/fpdf_progressive.cpp19
1 files changed, 7 insertions, 12 deletions
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp
index 65901f86f2..f5e11e8c81 100644
--- a/fpdfsdk/src/fpdf_progressive.cpp
+++ b/fpdfsdk/src/fpdf_progressive.cpp
@@ -33,8 +33,6 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
if (!pPage)
return FPDF_RENDER_FAILED;
- // FXMT_CSLOCK_OBJ(&pPage->m_PageLock);
-
CRenderContext* pContext = new CRenderContext;
pPage->SetPrivateData((void*)1, pContext, DropContext);
#ifdef _SKIA_SUPPORT_
@@ -81,8 +79,6 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
if (!pPage)
return FPDF_RENDER_FAILED;
- // FXMT_CSLOCK_OBJ(&pPage->m_PageLock);
-
CRenderContext* pContext = (CRenderContext*)pPage->GetPrivateData((void*)1);
if (pContext && pContext->m_pRenderer) {
IFSDK_PAUSE_Adapter IPauseAdapter(pause);
@@ -97,18 +93,17 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
}
DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) {
- if (page == NULL)
+ if (!page)
return;
CPDF_Page* pPage = ((CPDFXFA_Page*)page)->GetPDFPage();
if (!pPage)
return;
- // FXMT_CSLOCK_OBJ(&pPage->m_PageLock);
-
CRenderContext* pContext = (CRenderContext*)pPage->GetPrivateData((void*)1);
- if (pContext) {
- pContext->m_pDevice->RestoreState();
- delete pContext;
- pPage->RemovePrivateData((void*)1);
- }
+ if (!pContext)
+ return;
+
+ pContext->m_pDevice->RestoreState();
+ delete pContext;
+ pPage->RemovePrivateData((void*)1);
}