From cec01808e8b155f598b2a9ea527736ce774e76a2 Mon Sep 17 00:00:00 2001 From: rbpotter Date: Mon, 17 Apr 2017 09:10:21 -0700 Subject: Render image masks individually instead of rendering the entire page as a bitmap in order to reduce spool sizes. BUG=682156, 674771 Change-Id: Ic743ba729a7b9609be18fb620a5eb6bc440aed6a Reviewed-on: https://pdfium-review.googlesource.com/2916 Commit-Queue: Lei Zhang Reviewed-by: Lei Zhang --- core/fpdfapi/render/cpdf_progressiverenderer.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core/fpdfapi/render/cpdf_progressiverenderer.cpp') diff --git a/core/fpdfapi/render/cpdf_progressiverenderer.cpp b/core/fpdfapi/render/cpdf_progressiverenderer.cpp index 6aa3b8a309..c3cef1fc77 100644 --- a/core/fpdfapi/render/cpdf_progressiverenderer.cpp +++ b/core/fpdfapi/render/cpdf_progressiverenderer.cpp @@ -6,6 +6,8 @@ #include "core/fpdfapi/render/cpdf_progressiverenderer.h" +#include "core/fpdfapi/page/cpdf_image.h" +#include "core/fpdfapi/page/cpdf_imageobject.h" #include "core/fpdfapi/page/cpdf_pageobject.h" #include "core/fpdfapi/page/cpdf_pageobjectholder.h" #include "core/fpdfapi/render/cpdf_pagerendercache.h" @@ -95,6 +97,10 @@ void CPDF_ProgressiveRenderer::Continue(IFX_Pause* pPause) { return; nObjsToGo = kStepLimit; } + if (pCurObj->IsImage() && pCurObj->AsImage()->GetImage()->IsMask() && + (m_pOptions->m_Flags & RENDER_BREAKFORMASKS)) { + return; + } ++iter; } if (m_pCurrentLayer->m_pObjectHolder->IsParsed()) { -- cgit v1.2.3