From 78b334a824c42138f5e98060638b1643b0279602 Mon Sep 17 00:00:00 2001 From: rbpotter Date: Wed, 25 Oct 2017 11:58:41 -0700 Subject: Temporarily disable mask rendering again Bug: chromium:777837 Change-Id: I1830dc37b9c039a95509627026461134d8f2c16d Reviewed-on: https://pdfium-review.googlesource.com/16710 Reviewed-by: Lei Zhang Commit-Queue: Rebekah Potter --- fpdfsdk/fpdfview.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'fpdfsdk') diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index 98a5b32d96..96777cca63 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -866,10 +866,12 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc, // of masks. Full page bitmaps result in large spool sizes, so they should // only be used when necessary. For large numbers of masks, rendering each // individually is inefficient and unlikely to significantly improve spool - // size. - const bool bNewBitmap = - pPage->BackgroundAlphaNeeded() || - (pPage->HasImageMask() && pPage->GetMaskBoundingBoxes().size() > 100); + // size. TODO (rbpotter): Find out why this still breaks printing for some + // PDFs (see crbug.com/777837). + const bool bEnableImageMasks = false; + const bool bNewBitmap = pPage->BackgroundAlphaNeeded() || + (pPage->HasImageMask() && !bEnableImageMasks) || + pPage->GetMaskBoundingBoxes().size() > 100; const bool bHasMask = pPage->HasImageMask() && !bNewBitmap; if (bNewBitmap || bHasMask) { pBitmap = pdfium::MakeRetain(); -- cgit v1.2.3