From 0f6ceba6bf6a966c1946aec2ff985dc2728fd71b Mon Sep 17 00:00:00 2001 From: rbpotter Date: Thu, 10 Aug 2017 11:53:54 -0700 Subject: Temporarily disable image mask individual rendering Bug: chromium:753700 Change-Id: I28589739f4258fa62f3f853aa91bc6cffd7d96ba Reviewed-on: https://pdfium-review.googlesource.com/10611 Commit-Queue: Rebekah Potter Reviewed-by: Lei Zhang --- fpdfsdk/fpdfview.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fpdfsdk/fpdfview.cpp b/fpdfsdk/fpdfview.cpp index c9d6bee40e..51d9c9f6a3 100644 --- a/fpdfsdk/fpdfview.cpp +++ b/fpdfsdk/fpdfview.cpp @@ -854,14 +854,16 @@ FPDF_EXPORT void FPDF_CALLCONV FPDF_RenderPage(HDC dc, CPDF_PageRenderContext* pContext = pPage->GetRenderContext(); CFX_RetainPtr pBitmap; + // TODO(rbpotter): Restore the behavior described below after resolving + // crbug.com/753700 // Don't render the full page to bitmap for a mask unless there are a lot // 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. + // size. This fix is temporarily disabled due to crbug.com/753700 so all + // image masks will result in the full page rendering as bitmap. const bool bNewBitmap = - pPage->BackgroundAlphaNeeded() || - (pPage->HasImageMask() && pPage->GetMaskBoundingBoxes().size() > 100); + pPage->BackgroundAlphaNeeded() || pPage->HasImageMask(); const bool bHasMask = pPage->HasImageMask() && !bNewBitmap; if (bNewBitmap || bHasMask) { pBitmap = pdfium::MakeRetain(); -- cgit v1.2.3