From 88f474346523d64f64e444be0115c6226c9c62b3 Mon Sep 17 00:00:00 2001 From: Cary Clark Date: Wed, 19 Jul 2017 13:07:35 -0400 Subject: flush skia cache in progressive rendering If Skia has cached some drawing, flush it when progressive rendering at the same point in the pipeline as the non-progressive state. R=dsinclair@chromium.org Bug:736695 Change-Id: Ie24544a4be541ac8a5165dc064171772dd8893da Reviewed-on: https://pdfium-review.googlesource.com/8270 Reviewed-by: dsinclair Commit-Queue: Cary Clark --- fpdfsdk/fpdf_progressive.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/fpdfsdk/fpdf_progressive.cpp b/fpdfsdk/fpdf_progressive.cpp index d0075c9148..7bb4f7b0ed 100644 --- a/fpdfsdk/fpdf_progressive.cpp +++ b/fpdfsdk/fpdf_progressive.cpp @@ -60,6 +60,10 @@ DLLEXPORT int STDCALL FPDF_RenderPageBitmap_Start(FPDF_BITMAP bitmap, FPDF_RenderPage_Retail(pContext, page, start_x, start_y, size_x, size_y, rotate, flags, false, &IPauseAdapter); +#ifdef _SKIA_SUPPORT_PATHS_ + pDevice->Flush(); + pBitmap->UnPreMultiply(); +#endif if (pContext->m_pRenderer) { return CPDF_ProgressiveRenderer::ToFPDFStatus( pContext->m_pRenderer->GetStatus()); @@ -80,6 +84,10 @@ DLLEXPORT int STDCALL FPDF_RenderPage_Continue(FPDF_PAGE page, if (pContext && pContext->m_pRenderer) { IFSDK_PAUSE_Adapter IPauseAdapter(pause); pContext->m_pRenderer->Continue(&IPauseAdapter); +#ifdef _SKIA_SUPPORT_PATHS_ + pDevice->Flush(); + pBitmap->UnPreMultiply(); +#endif return CPDF_ProgressiveRenderer::ToFPDFStatus( pContext->m_pRenderer->GetStatus()); } -- cgit v1.2.3