summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbpotter <rbpotter@chromium.org>2017-08-10 11:53:54 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-10 21:36:19 +0000
commit0f6ceba6bf6a966c1946aec2ff985dc2728fd71b (patch)
treee3473cbaa8110c517b16d81589c32557618538d0
parent7ffb59f7f540a67fb808c1e5a2a7edfacf125e3a (diff)
downloadpdfium-0f6ceba6bf6a966c1946aec2ff985dc2728fd71b.tar.xz
Temporarily disable image mask individual rendering
Bug: chromium:753700 Change-Id: I28589739f4258fa62f3f853aa91bc6cffd7d96ba Reviewed-on: https://pdfium-review.googlesource.com/10611 Commit-Queue: Rebekah Potter <rbpotter@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
-rw-r--r--fpdfsdk/fpdfview.cpp8
1 files 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<CFX_DIBitmap> 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<CFX_DIBitmap>();