summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_progressive.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'fpdfsdk/fpdf_progressive.cpp')
-rw-r--r--fpdfsdk/fpdf_progressive.cpp15
1 files changed, 12 insertions, 3 deletions
diff --git a/fpdfsdk/fpdf_progressive.cpp b/fpdfsdk/fpdf_progressive.cpp
index 1b10a119dc..2411869904 100644
--- a/fpdfsdk/fpdf_progressive.cpp
+++ b/fpdfsdk/fpdf_progressive.cpp
@@ -61,7 +61,7 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap,
rotate, flags, false, &IPauseAdapter);
#ifdef _SKIA_SUPPORT_PATHS_
- pDevice->Flush();
+ pDevice->Flush(false);
pBitmap->UnPreMultiply();
#endif
if (pContext->m_pRenderer) {
@@ -86,7 +86,7 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
pContext->m_pRenderer->Continue(&IPauseAdapter);
#ifdef _SKIA_SUPPORT_PATHS_
CFX_RenderDevice* pDevice = pContext->m_pDevice.get();
- pDevice->Flush();
+ pDevice->Flush(false);
pDevice->GetBitmap()->UnPreMultiply();
#endif
return CPDF_ProgressiveRenderer::ToFPDFStatus(
@@ -97,6 +97,15 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page,
DLLEXPORT void STDCALL FPDF_RenderPage_Close(FPDF_PAGE page) {
CPDF_Page* pPage = CPDFPageFromFPDFPage(page);
- if (pPage)
+ if (pPage) {
+#ifdef _SKIA_SUPPORT_PATHS_
+ CPDF_PageRenderContext* pContext = pPage->GetRenderContext();
+ if (pContext && pContext->m_pRenderer) {
+ CFX_RenderDevice* pDevice = pContext->m_pDevice.get();
+ pDevice->Flush(true);
+ pDevice->GetBitmap()->UnPreMultiply();
+ }
+#endif
pPage->SetRenderContext(nullptr);
+ }
}