summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fpdfsdk/fpdfview.cpp10
1 files changed, 6 insertions, 4 deletions
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<CFX_DIBitmap>();