summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page
diff options
context:
space:
mode:
authorDan Sinclair <dsinclair@chromium.org>2017-10-04 14:22:18 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-04 18:33:08 +0000
commit3878e1a206db89f8a9e38c72e7557fab04f96aa5 (patch)
treee104af570d82ccb8338d514f60f9da4a2828c96b /core/fpdfapi/page
parent643266cc8eb98ac680d838a2c5bc2dc8c25a9b08 (diff)
downloadpdfium-3878e1a206db89f8a9e38c72e7557fab04f96aa5.tar.xz
Make CPDF_TransferFunc members private
This CL moves the member variables of CPDF_TransferFunc to be private from public and adds accessors as needed. Change-Id: Ib5158721bbe833727b333da794d774f17e4fdea7 Reviewed-on: https://pdfium-review.googlesource.com/15451 Reviewed-by: Henrique Nakashima <hnakashima@chromium.org> Commit-Queue: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'core/fpdfapi/page')
-rw-r--r--core/fpdfapi/page/cpdf_generalstate.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/core/fpdfapi/page/cpdf_generalstate.cpp b/core/fpdfapi/page/cpdf_generalstate.cpp
index 6f4062fb65..845cedd496 100644
--- a/core/fpdfapi/page/cpdf_generalstate.cpp
+++ b/core/fpdfapi/page/cpdf_generalstate.cpp
@@ -304,17 +304,18 @@ CPDF_GeneralState::StateData::StateData(const StateData& that)
m_Matrix = that.m_Matrix;
m_SMaskMatrix = that.m_SMaskMatrix;
- if (that.m_pTransferFunc && that.m_pTransferFunc->m_pPDFDoc) {
+ if (that.m_pTransferFunc && that.m_pTransferFunc->GetDocument()) {
CPDF_DocRenderData* pDocCache =
- that.m_pTransferFunc->m_pPDFDoc->GetRenderData();
+ that.m_pTransferFunc->GetDocument()->GetRenderData();
if (pDocCache)
m_pTransferFunc = pDocCache->GetTransferFunc(m_pTR.Get());
}
}
CPDF_GeneralState::StateData::~StateData() {
- if (m_pTransferFunc && m_pTransferFunc->m_pPDFDoc) {
- CPDF_DocRenderData* pDocCache = m_pTransferFunc->m_pPDFDoc->GetRenderData();
+ if (m_pTransferFunc && m_pTransferFunc->GetDocument()) {
+ CPDF_DocRenderData* pDocCache =
+ m_pTransferFunc->GetDocument()->GetRenderData();
if (pDocCache) {
m_pTransferFunc.Reset(); // Give up our reference first.
pDocCache->MaybePurgeTransferFunc(m_pTR.Get());