Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(734)

Unified Diff: fpdfsdk/src/fpdf_progressive.cpp

Issue 1398703009: Next round of XFA changes to match master (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@xfa
Patch Set: remove arg Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: fpdfsdk/src/fpdf_progressive.cpp
diff --git a/fpdfsdk/src/fpdf_progressive.cpp b/fpdfsdk/src/fpdf_progressive.cpp
index 65901f86f21ff3125c9ef6d49487c411f4aa55ea..f5e11e8c811cf9f182d3446ed40bed383eff7fd2 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);
}

Powered by Google App Engine
This is Rietveld 408576698