From dfbf8e7ba55695c4e6cb30eadbe9c6a2955815ba Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Wed, 14 Oct 2015 14:17:26 -0700 Subject: 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 . --- fpdfsdk/src/fpdf_progressive.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) (limited to 'fpdfsdk/src/fpdf_progressive.cpp') 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); } -- cgit v1.2.3