summaryrefslogtreecommitdiff
path: root/fpdfsdk/src/fpdf_progressive.cpp
diff options
context:
space:
mode:
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);
}