summaryrefslogtreecommitdiff
path: root/chromium/third_party/pdfium/fpdfsdk/fpdfview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/pdfium/fpdfsdk/fpdfview.cpp')
-rw-r--r--chromium/third_party/pdfium/fpdfsdk/fpdfview.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/chromium/third_party/pdfium/fpdfsdk/fpdfview.cpp b/chromium/third_party/pdfium/fpdfsdk/fpdfview.cpp
index af1d0db1afa..069a7239fd6 100644
--- a/chromium/third_party/pdfium/fpdfsdk/fpdfview.cpp
+++ b/chromium/third_party/pdfium/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>();