summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdf_progressive.cpp
diff options
context:
space:
mode:
authorCary Clark <caryclark@skia.org>2017-07-19 13:07:35 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-07-19 18:58:51 +0000
commit88f474346523d64f64e444be0115c6226c9c62b3 (patch)
treee4284dfc5830fc9196327298a8c1d5377dd2cf6c /fpdfsdk/fpdf_progressive.cpp
parent56a805477a72a540a520b08cedd48f1cf250ae8b (diff)
downloadpdfium-88f474346523d64f64e444be0115c6226c9c62b3.tar.xz
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 <dsinclair@chromium.org> Commit-Queue: Cary Clark <caryclark@google.com>
Diffstat (limited to 'fpdfsdk/fpdf_progressive.cpp')
-rw-r--r--fpdfsdk/fpdf_progressive.cpp8
1 files changed, 8 insertions, 0 deletions
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());
}