summaryrefslogtreecommitdiff
path: root/fpdfsdk/fpdfeditpage.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-09-02 15:22:00 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-02 15:22:00 -0700
commitbbee445c5a77dfbaea9041308f001c756e49c5fd (patch)
tree65fe8d3808891c81c791e8592ba3aba8d9e2d81c /fpdfsdk/fpdfeditpage.cpp
parentd54c9d8df1511f6abac291ec2ec660cef372d9d3 (diff)
downloadpdfium-bbee445c5a77dfbaea9041308f001c756e49c5fd.tar.xz
Make CPDF_GeneralState have a CPDF_GeneralStateDatachromium/2848
Remove a const cast along the way and propagate to callers. Review-Url: https://codereview.chromium.org/2303553002
Diffstat (limited to 'fpdfsdk/fpdfeditpage.cpp')
-rw-r--r--fpdfsdk/fpdfeditpage.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/fpdfsdk/fpdfeditpage.cpp b/fpdfsdk/fpdfeditpage.cpp
index 1301018709..d11bfa9474 100644
--- a/fpdfsdk/fpdfeditpage.cpp
+++ b/fpdfsdk/fpdfeditpage.cpp
@@ -222,23 +222,19 @@ FPDFPageObj_HasTransparency(FPDF_PAGEOBJECT pageObject) {
return FALSE;
CPDF_PageObject* pPageObj = reinterpret_cast<CPDF_PageObject*>(pageObject);
- const CPDF_GeneralStateData* pGeneralState =
- pPageObj->m_GeneralState.GetObject();
- int blend_type =
- pGeneralState ? pGeneralState->m_BlendType : FXDIB_BLEND_NORMAL;
+ int blend_type = pPageObj->m_GeneralState.GetBlendType();
if (blend_type != FXDIB_BLEND_NORMAL)
return TRUE;
CPDF_Dictionary* pSMaskDict =
- pGeneralState ? ToDictionary(pGeneralState->m_pSoftMask) : nullptr;
+ ToDictionary(pPageObj->m_GeneralState.GetSoftMask());
if (pSMaskDict)
return TRUE;
- if (pGeneralState && pGeneralState->m_FillAlpha != 1.0f)
+ if (pPageObj->m_GeneralState.GetFillAlpha() != 1.0f)
return TRUE;
- if (pPageObj->IsPath() && pGeneralState &&
- pGeneralState->m_StrokeAlpha != 1.0f) {
+ if (pPageObj->IsPath() && pPageObj->m_GeneralState.GetStrokeAlpha() != 1.0f) {
return TRUE;
}