summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-08-30 15:26:20 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-08-30 22:44:56 +0000
commit0a49b11d0215c386cafe739c552780542cbe5824 (patch)
tree587f3e9a40a65507ac39ebd5d370b816ea03c3cc
parentcf04eebc969d9944b2e1d3bdf91638640611997f (diff)
downloadpdfium-chromium/3163.tar.xz
M61: Temporarily disable image mask individual renderingchromium/3163
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> TBR=rbpotter@chromium.org (cherry picked from commit 0f6ceba6bf6a966c1946aec2ff985dc2728fd71b) Reviewed-on: https://pdfium-review.googlesource.com/12510 Commit-Queue: 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 7dbaf7f9e7..94cc97885a 100644
--- a/fpdfsdk/fpdfview.cpp
+++ b/fpdfsdk/fpdfview.cpp
@@ -831,14 +831,16 @@ DLLEXPORT void STDCALL 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>();