summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/cpdf_pageobject.cpp
diff options
context:
space:
mode:
authorwileyrya <wileyrr@gmail.com>2017-05-31 14:49:05 -0500
committerChromium commit bot <commit-bot@chromium.org>2017-06-01 15:03:14 +0000
commite858aa4b70db7408bda1aed71827d9eee1dd98c5 (patch)
treeb80ff68a8a32487bb2511fb8d83af917e6e6583b /core/fpdfapi/page/cpdf_pageobject.cpp
parent5be0b291bce26e1a12c9a7becb7c9a9e7857a456 (diff)
downloadpdfium-e858aa4b70db7408bda1aed71827d9eee1dd98c5.tar.xz
Fix content generation to only generate dirty page objects.
BUG=pdfium:717 R=dsinclair@chromium.org,thestig@chromium.org Change-Id: I7e0e6fd301d40f9b5341d40cf11167b7748af243 Reviewed-on: https://pdfium-review.googlesource.com/6071 Reviewed-by: dsinclair <dsinclair@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page/cpdf_pageobject.cpp')
-rw-r--r--core/fpdfapi/page/cpdf_pageobject.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/fpdfapi/page/cpdf_pageobject.cpp b/core/fpdfapi/page/cpdf_pageobject.cpp
index 09a98eee7d..79d9bbc540 100644
--- a/core/fpdfapi/page/cpdf_pageobject.cpp
+++ b/core/fpdfapi/page/cpdf_pageobject.cpp
@@ -6,7 +6,7 @@
#include "core/fpdfapi/page/cpdf_pageobject.h"
-CPDF_PageObject::CPDF_PageObject() {}
+CPDF_PageObject::CPDF_PageObject() : m_bDirty(false) {}
CPDF_PageObject::~CPDF_PageObject() {}
@@ -76,18 +76,21 @@ void CPDF_PageObject::CopyData(const CPDF_PageObject* pSrc) {
m_Right = pSrc->m_Right;
m_Top = pSrc->m_Top;
m_Bottom = pSrc->m_Bottom;
+ m_bDirty = true;
}
void CPDF_PageObject::TransformClipPath(CFX_Matrix& matrix) {
if (!m_ClipPath.HasRef())
return;
m_ClipPath.Transform(matrix);
+ SetDirty(true);
}
void CPDF_PageObject::TransformGeneralState(CFX_Matrix& matrix) {
if (!m_GeneralState.HasRef())
return;
m_GeneralState.GetMutableMatrix()->Concat(matrix);
+ SetDirty(true);
}
FX_RECT CPDF_PageObject::GetBBox(const CFX_Matrix* pMatrix) const {