summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-10-30 21:58:04 +0000
committerChromium commit bot <commit-bot@chromium.org>2017-10-30 21:58:04 +0000
commita8caf1c23a8376705d8cb08500d82aa6e948a082 (patch)
treebcb35f98d41a15c340b521eaa88eb107846af7d3
parentcd1fd6bc4343c303ee786983dc5dd41a2e0bc16c (diff)
downloadpdfium-a8caf1c23a8376705d8cb08500d82aa6e948a082.tar.xz
M63: Temporarily disable mask rendering again
Bug: chromium:777837 TBR=rbpotter@chromium.org Change-Id: I1830dc37b9c039a95509627026461134d8f2c16d Reviewed-on: https://pdfium-review.googlesource.com/16710 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Rebekah Potter <rbpotter@chromium.org> (cherry picked from commit 78b334a824c42138f5e98060638b1643b0279602) Reviewed-on: https://pdfium-review.googlesource.com/17190 Commit-Queue: Lei Zhang <thestig@chromium.org>
-rw-r--r--fpdfsdk/fpdfview.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp
index af1d0db1af..069a7239fd 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -869,10 +869,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<CFX_DIBitmap>();