diff options
author | rbpotter <rbpotter@chromium.org> | 2017-04-17 09:10:21 -0700 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-04-18 00:26:02 +0000 |
commit | cec01808e8b155f598b2a9ea527736ce774e76a2 (patch) | |
tree | 9614ce31345bb73e9d7c1a438c10bb83776599c3 /core/fpdfapi/page/cpdf_pageobjectholder.h | |
parent | 080dfd89269a95713d31d66829016d4885afe76b (diff) | |
download | pdfium-cec01808e8b155f598b2a9ea527736ce774e76a2.tar.xz |
Render image masks individually instead of rendering the entire page as
a bitmap in order to reduce spool sizes.
BUG=682156, 674771
Change-Id: Ic743ba729a7b9609be18fb620a5eb6bc440aed6a
Reviewed-on: https://pdfium-review.googlesource.com/2916
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobjectholder.h')
-rw-r--r-- | core/fpdfapi/page/cpdf_pageobjectholder.h | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobjectholder.h b/core/fpdfapi/page/cpdf_pageobjectholder.h index aee7617c1f..0b88a86518 100644 --- a/core/fpdfapi/page/cpdf_pageobjectholder.h +++ b/core/fpdfapi/page/cpdf_pageobjectholder.h @@ -8,6 +8,7 @@ #define CORE_FPDFAPI_PAGE_CPDF_PAGEOBJECTHOLDER_H_ #include <memory> +#include <vector> #include "core/fpdfapi/page/cpdf_pageobjectlist.h" #include "core/fxcrt/fx_coordinates.h" @@ -41,9 +42,11 @@ class CPDF_PageObjectHolder { m_bBackgroundAlphaNeeded = needed; } - bool HasImageMask() const { return m_bHasImageMask; } - void SetHasImageMask(bool value) { m_bHasImageMask = value; } - + bool HasImageMask() const { return !m_MaskBoundingBoxes.empty(); } + const std::vector<CFX_FloatRect>& GetMaskBoundingBoxes() const { + return m_MaskBoundingBoxes; + } + void AddImageMaskBoundingBox(const CFX_FloatRect& box); void Transform(const CFX_Matrix& matrix); CFX_FloatRect CalcBoundingBox() const; @@ -61,7 +64,7 @@ class CPDF_PageObjectHolder { void LoadTransInfo(); bool m_bBackgroundAlphaNeeded; - bool m_bHasImageMask; + std::vector<CFX_FloatRect> m_MaskBoundingBoxes; ParseState m_ParseState; std::unique_ptr<CPDF_ContentParser> m_pParser; CPDF_PageObjectList m_PageObjectList; |